client.clusters.list_kubernetes_deployments

A method of the Clusters endpoint.

list_kubernetes_deployments(id: int, *, base_type: str = None, state: str = None, start_date: str = None, end_date: str = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse

List the deployments associated with a Kubernetes Cluster

API URL: GET /clusters/kubernetes/{id}/deployments

import civis
client = civis.APIClient()
response = client.clusters.list_kubernetes_deployments(...)
Parameters:
idint

The id of the cluster.

base_typestr, optional

If specified, return deployments of these base types. It accepts a comma- separated list, possible values are ‘Notebook’, ‘Service’, ‘Run’.

statestr, optional

If specified, return deployments in these states. It accepts a comma- separated list, possible values are pending, running, terminated, sleeping

start_datestr, optional

If specified, return deployments created after this date. Must be 31 days or less before end date. Defaults to 7 days prior to end date. The date must be provided in the format YYYY-MM-DD.

end_datestr, optional

If specified, return deployments created before this date. Defaults to 7 days after start date, or today if start date is not specified. The date must be provided in the format YYYY-MM-DD.

limitint, optional

Number of results to return. Defaults to its maximum of 50.

page_numint, optional

Page number of the results to return. Defaults to the first page, 1.

orderstr, optional

The field on which to order the result set. Defaults to created_at. Must be one of: created_at.

order_dirstr, optional

Direction in which to sort, either asc (ascending) or desc (descending) defaulting to asc.

iteratorbool, optional

If True, return a generator (specifically, a civis.PaginatedResponse object) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return a civis.ListResponse object (= a list of civis.Response objects), whose size is determined by ‘limit’. Defaults to False.

Returns:
civis.ListResponse | civis.PaginatedResponse
  • idint

    The id of this deployment.

  • namestr

    The name of the deployment.

  • base_idint

    The id of the base object associated with the deployment.

  • base_typestr

    The base type of this deployment.

  • statestr

    The state of the deployment.

  • cpuint

    The CPU in millicores required by the deployment.

  • memoryint

    The memory in MB required by the deployment.

  • disk_spaceint

    The disk space in GB required by the deployment.

  • instance_typestr

    The EC2 instance type requested for the deployment.

  • authorcivis.Response
    • idint

      The ID of this user.

    • namestr

      This user’s name.

    • usernamestr

      This user’s username.

    • initialsstr

      This user’s initials.

    • onlinebool

      Whether this user is online.

  • max_memory_usagefloat (float)

    If the deployment has finished, the maximum amount of memory used during the deployment, in MB.

  • max_cpu_usagefloat (float)

    If the deployment has finished, the maximum amount of cpu used during the deployment, in millicores.

  • created_at : str (time)

  • updated_at : str (time)