client.clusters.post_kubernetes_partitions
A method of the Clusters endpoint.
- post_kubernetes_partitions(id: int, instance_configs: List[dict], name: str, labels: List[str]) Response
Create a Cluster Partition for given cluster
API URL:
POST /clusters/kubernetes/{id}/partitionsimport civis client = civis.APIClient() response = client.clusters.post_kubernetes_partitions(...)
- Parameters:
- idint
The ID of the cluster which this partition belongs to.
- instance_configsList[dict]
The instances configured for this cluster partition.
- 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.
- namestr
The name of the cluster partition.
- labelsList[str]
Labels associated with this partition.
- Returns:
civis.Response- 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_stats
civis.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.
- usage_stats
- instance_configsList[
- default_instance_config_idint
The id of the InstanceConfig that is the default for this partition.