DeadlineCloud / Client / update_worker

update_worker

DeadlineCloud.Client.update_worker(**kwargs)

Updates a worker.

See also: AWS API Documentation

Request Syntax

response = client.update_worker(
    farmId='string',
    fleetId='string',
    workerId='string',
    status='STARTED'|'STOPPING'|'STOPPED',
    capabilities={
        'amounts': [
            {
                'name': 'string',
                'value': ...
            },
        ],
        'attributes': [
            {
                'name': 'string',
                'values': [
                    'string',
                ]
            },
        ]
    },
    hostProperties={
        'ipAddresses': {
            'ipV4Addresses': [
                'string',
            ],
            'ipV6Addresses': [
                'string',
            ]
        },
        'hostName': 'string'
    }
)
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.

  • status (string) – The worker status to update.

  • capabilities (dict) –

    The worker capabilities to update.

    • amounts (list) – [REQUIRED]

      The worker capabilities amounts on a list of worker capabilities.

      • (dict) –

        The details of the worker amount capability.

        • name (string) – [REQUIRED]

          The name of the worker amount capability.

        • value (float) – [REQUIRED]

          The value of the worker amount capability.

    • attributes (list) – [REQUIRED]

      The worker attribute capabilities in the list of attribute capabilities.

      • (dict) –

        The details of the worker attribute capability.

        • name (string) – [REQUIRED]

          The name of the worker attribute capability.

        • values (list) – [REQUIRED]

          The values of the worker amount capability.

          • (string) –

  • hostProperties (dict) –

    The host properties to update.

    • ipAddresses (dict) –

      The IP address of the host.

      • ipV4Addresses (list) –

        The IpV4 address of the network.

        • (string) –

      • ipV6Addresses (list) –

        The IpV6 address for the network and node component.

        • (string) –

    • hostName (string) –

      The host name.

Return type:

dict

Returns:

Response Syntax

{
    'log': {
        'logDriver': 'string',
        'options': {
            'string': 'string'
        },
        'parameters': {
            'string': 'string'
        },
        'error': 'string'
    },
    'hostConfiguration': {
        'scriptBody': 'string',
        'scriptTimeoutSeconds': 123
    }
}

Response Structure

  • (dict) –

    • log (dict) –

      The worker log to update.

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

    • hostConfiguration (dict) –

      The script that runs as a worker is starting up that you can use to provide additional configuration for workers in your fleet.

      • scriptBody (string) –

        The text of the script that runs as a worker is starting up that you can use to provide additional configuration for workers in your fleet. The script runs after a worker enters the STARTING state and before the worker processes tasks.

        For more information about using the script, see Run scripts as an administrator to configure workers in the Deadline Cloud Developer Guide.

        Warning

        The script runs as an administrative user ( sudo root on Linux, as an Administrator on Windows).

      • scriptTimeoutSeconds (integer) –

        The maximum time that the host configuration can run. If the timeout expires, the worker enters the NOT RESPONDING state and shuts down. You are charged for the time that the worker is running the host configuration script.

        Note

        You should configure your fleet for a maximum of one worker while testing your host configuration script to avoid starting additional workers.

        The default is 300 seconds (5 minutes).

Exceptions