DeadlineCloud / Client / create_worker

create_worker

DeadlineCloud.Client.create_worker(**kwargs)

Creates a worker. A worker tells your instance how much processing power (vCPU), and memory (GiB) you’ll need to assemble the digital assets held within a particular instance. You can specify certain instance types to use, or let the worker know which instances types to exclude.

Deadline Cloud limits the number of workers to less than or equal to the fleet’s maximum worker count. The service maintains eventual consistency for the worker count. If you make multiple rapid calls to CreateWorker before the field updates, you might exceed your fleet’s maximum worker count. For example, if your maxWorkerCount is 10 and you currently have 9 workers, making two quick CreateWorker calls might successfully create 2 workers instead of 1, resulting in 11 total workers.

See also: AWS API Documentation

Request Syntax

response = client.create_worker(
    farmId='string',
    fleetId='string',
    hostProperties={
        'ipAddresses': {
            'ipV4Addresses': [
                'string',
            ],
            'ipV6Addresses': [
                'string',
            ]
        },
        'hostName': 'string'
    },
    clientToken='string',
    tags={
        'string': 'string'
    }
)
Parameters:
  • farmId (string) –

    [REQUIRED]

    The farm ID of the farm to connect to the worker.

  • fleetId (string) –

    [REQUIRED]

    The fleet ID to connect to the worker.

  • hostProperties (dict) –

    The IP address and host name of the worker.

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

  • clientToken (string) –

    The unique token which the server uses to recognize retries of the same request.

    This field is autopopulated if not provided.

  • tags (dict) –

    Each tag consists of a tag key and a tag value. Tag keys and values are both required, but tag values can be empty strings.

    • (string) –

      • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'workerId': 'string'
}

Response Structure

  • (dict) –

    • workerId (string) –

      The worker ID.

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