Update a Tugboat Project

Updates the properties of a Tugboat Project, or a set of Tugboat Projects

Arguments

  • project - Required
    The ID of the project to update.

  • name - Optional
    A human-readable name to associate with the project.

  • users - Optional
    A list of API Key IDs that should have user-level access to the project, and any repositories in it. This can be a single ID, or an array of IDs.
  • admins - Optional
    A list of API Key IDs that should have admin-level access to the project, and any repositories in it. This can be a single ID, or an array of IDs.
  • quota - Optional
    A disk quota in GB to impose on the project. A quota of 0 means that there is no quota. Only a Tugboat Admin can modify this field.

  • memory - Optional
    The amount of memory, in MB, allocated to each service container running in the project. Setting this to 0 disables the memory limit, and service containers are allowed to use as much memory as they want. A soft limit of half this value is automatically imposed on every container, so that if the host server starts to run low on memory, service containers can start freeing their memory to hlep prevent a system-wide Out of Memory event. Only a Tugboat Admin can modify this field.

  • cpus - Optional
    The maximum number of CPU cores that each service container in the project has access to. This value does not need to be in whole numbers. Fractions as small as 0.001 are allowed. 0.000 means no limit. Only a Tugboat Admin can modify this field.

  • base - Optional
    Whether to enable the base preview feature for the project. Only a Tugboat Admin can modify this field.

  • sleep - Optional
    After this many minutes of inactivity, a preview in this project will be suspended to save resources. A value of 0 means that previews will not be suspended. Only a Tugboat Admin can modify this field.

  • agent - Optional
    The Tugboat Agent to use by default when creating repositories in this project. Only a Tugboat Admin can modify this field.

Example

socket.emit('tugboat', 'projects', 'update', args, callback);

Output

single

[
    {
        "updatedAt": "2017-02-14T18:47:18.102Z",
        "createdAt": "2017-02-14T18:47:18.102Z",
        "name": "test",
        "_id": "58a350b6ce7c680001458884",
        "sleep": true,
        "base": false,
        "size": 0,
        "quota": 0,
        "admins": ["58a22d61f405580001b36b84"],
        "users": ["58a22d61f405580001b36b86"],
        "id": "58a350b6ce7c680001458884"
    }
]

array

[
    {
        "updatedAt": "2017-02-14T18:47:18.102Z",
        "createdAt": "2017-02-14T18:47:18.102Z",
        "name": "test",
        "_id": "58a350b6ce7c680001458884",
        "sleep": true,
        "base": false,
        "size": 0,
        "quota": 0,
        "admins": ["58a22d61f405580001b36b84"],
        "users": ["58a22d61f405580001b36b86"],
        "id": "58a350b6ce7c680001458884"
    }
]

Errors

  • 1003: No Projects Found
    Returned if the requested projects do not exist, or the requestor does not have permission to update them.

  • 1004: No Project ID Provided
    The required project argument was not included in the request.

  • 1010: Unknown Agent
    The specified agent does not exist.

results matching ""

    No results matching ""