client.notebooks.list_deployments
A method of the Notebooks endpoint.
- list_deployments(notebook_id: int, *, deployment_id: int = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse
List deployments for a Notebook
API URL:
GET /notebooks/{notebook_id}/deploymentsimport civis client = civis.APIClient() response = client.notebooks.list_deployments(...)
- Parameters:
- notebook_idint
The ID of the owning Notebook
- deployment_idint, optional
The ID for this deployment
- limitint, optional
Number of results to return. Defaults to 20. Maximum allowed is 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 desc.
- iteratorbool, optional
If True, return a generator (specifically, a
civis.PaginatedResponseobject) 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 acivis.ListResponseobject (= a list ofcivis.Responseobjects), whose size is determined by ‘limit’. Defaults to False.
- Returns:
civis.ListResponse|civis.PaginatedResponse- deployment_idint
The ID for this deployment.
- user_idint
The ID of the owner.
- hoststr
Domain of the deployment.
- namestr
Name of the deployment.
- docker_image_namestr
The name of the docker image to pull from DockerHub.
- docker_image_tagstr
The tag of the docker image to pull from DockerHub (default: latest).
- instance_typestr
The EC2 instance type requested for the deployment.
- memoryint
The memory allocated to the deployment, in MB.
- cpuint
The cpu allocated to the deployment, in millicores.
- statestr
The state of the deployment. One of pending, running, terminated or sleeping.
- state_messagestr
A detailed description of the state.
- 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)
- notebook_idint
The ID of the owning Notebook