client.clusters.list_kubernetes

A method of the Clusters endpoint.

list_kubernetes(*, organization_id: int = None, organization_slug: str = None, raw_cluster_slug: str = None, exclude_inactive_orgs: bool = None, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse

List Kubernetes Clusters

API URL: GET /clusters/kubernetes

import civis
client = civis.APIClient()
response = client.clusters.list_kubernetes(...)
Parameters:
organization_idint, optional

The ID of this cluster’s organization. Cannot be used along with the organization slug.

organization_slugstr, optional

The slug of this cluster’s organization. Cannot be used along with the organization ID.

raw_cluster_slugstr, optional

The slug of this cluster’s raw configuration.

exclude_inactive_orgsbool, optional

When true, excludes KubeClusters associated with inactive orgs. Defaults to false.

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 organization_id. Must be one of: organization_id, 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 cluster.

  • organization_idstr

    The id of this cluster’s organization.

  • organization_namestr

    The name of this cluster’s organization.

  • organization_slugstr

    The slug of this cluster’s organization.

  • raw_cluster_slugstr

    The slug of this cluster’s raw configuration.

  • custom_partitionsbool

    Whether this cluster has a custom partition configuration.

  • cluster_partitionsList[civis.Response]

    List of cluster partitions associated with this cluster.

    • cluster_partition_idint

      The ID of this cluster partition.

    • namestr

      The name of the cluster partition.

    • labelsList[str]

      Labels associated with this partition.

    • instance_configsList[civis.Response]

      The instances configured for this cluster partition.

      • instance_config_idint

        The ID of this InstanceConfig.

      • instance_typestr

        An EC2 instance type. Possible values include t2.large, m4.xlarge, m4.2xlarge, m4.4xlarge, m5.12xlarge, c5.18xlarge, and g6.2xlarge.

      • min_instancesint

        The minimum number of instances of that type in this cluster.

      • max_instancesint

        The maximum number of instances of that type in this cluster.

      • instance_max_memoryint

        The amount of memory (RAM) available to a single instance of that type in megabytes.

      • instance_max_cpuint

        The number of processor shares available to a single instance of that type in millicores.

      • instance_max_diskint

        The amount of disk available to a single instance of that type in gigabytes.

      • usage_statscivis.Response
        • pending_memory_requestedint

          The sum of memory requests (in MB) for pending deployments in this instance config.

        • pending_cpu_requestedint

          The sum of cpu requests (in millicores) for pending deployments in this instance config.

        • running_memory_requestedint

          The sum of memory requests (in MB) for running deployments in this instance config.

        • running_cpu_requestedint

          The sum of cpu requests (in millicores) for running deployments in this instance config.

        • pending_deploymentsint

          The number of pending deployments in this instance config.

        • running_deploymentsint

          The number of running deployments in this instance config.

    • default_instance_config_idint

      The id of the InstanceConfig that is the default for this partition.

  • is_nat_enabledbool

    Whether this cluster needs a NAT gateway or not.