File size: 5,636 Bytes
76d9c4f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
---
title: Serving
version: EN
---
### list_servings
```python
vessl.list_servings(
organization: str
)
```
Get a list of all servings in an organization
**Args**
* `organization` (str) : The name of the organization.
**Example**
```python
vessl.list_servings(organization="my-org")
```
----
## create_revision_from_yaml
```python
vessl.create_revision_from_yaml(
organization: str, serving_name: str, yaml_body: str
)
```
Create a new revision of serving from a YAML file.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
* `yaml_body` (str) : The YAML body of the serving.
It is not deserialized YAML, but a whole yaml string.
**Example**
```python
vessl.create_revision_from_yaml(
organization="my-org",
serving_name="my-serving",
yaml_body=yaml_body)
```
----
## read_revision
```python
vessl.read_revision(
organization: str, serving_name: str, revision_number: int
)
```
Get a serving revision from a serving name and revision number.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
* `revision_number` (int) : The revision number of the serving.
**Example**
```python
vessl.read_revision(
organization="my-org",
serving_name="my-serving",
revision_number=1)
```
----
## list_revisions
```python
vessl.list_revisions(
organization: str, serving_name: str
)
```
Get a list of all revisions of a serving.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
**Examples**
```python
vessl.list_revisions(
organization="my-org",
serving_name="my-serving")
```
----
## read_gateway
```python
vessl.read_gateway(
organization: str, serving_name: str
)
```
Get the gateway of a serving.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
**Examples**
```python
vessl.read_gateway(
organization="my-org",
serving_name="my-serving")
```
----
## terminate_revision
```python
vessl.terminate_revision(
organization: str, serving_name: str, revision_number: int
)
```
Terminate a serving revision from a serving name and revision number.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
* `revision_number` (int) : The revision number of the serving.
**Example**
```python
vessl.terminate_revision(
organization="my-org",
serving_name="my-serving",
revision_number=1)
```
----
## update_revision_autoscaler_config
```python
vessl.update_revision_autoscaler_config(
organization: str, serving_name: str, revision_number: int,
auto_scaler_config: AutoScalerConfig
)
```
Update the autoscaler config of a serving revision from a serving name and revision number.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
* `revision_number` (int) : The revision number of the serving.
* `auto_scaler_config` (AutoScalerConfig) : The autoscaler config of the serving.
**Example**
```python
vessl.update_revision_autoscaler_config(
organization="my-org",
serving_name="my-serving",
revision_number=1,
auto_scaler_config=AutoScalerConfig(
min_replicas=1,
max_replicas=2,
target_cpu_utilization_percentage=80,
))
```
----
## update_gateway
```python
vessl.update_gateway(
organization: str, serving_name: str,
gateway: ModelServiceGatewayUpdateAPIInput
)
```
Update the gateway of a serving.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
* `gateway` (ModelServiceGatewayUpdateAPIInput) : The gateway of the serving.
**Examples**
```python
from openapi_client import ModelServiceGatewayUpdateAPIInput
from openapi_client import OrmModelServiceGatewayTrafficSplitEntry
gateway = ModelServiceGatewayUpdateAPIInput(
enabled=True,
ingress_host="my-endpoint",
traffic_split=[
OrmModelServiceGatewayTrafficSplitEntry(
revision_number=1,
port=2222,
traffic_weight=100,
)
],
)
vessl.update_gateway(
organization="my-org",
serving_name="my-serving",
gateway=gateway)
```
----
## update_gateway_for_revision
```python
vessl.update_gateway_for_revision(
organization: str, serving_name: str, revision_number: int, port: int,
weight: int
)
```
Update the current gateway of a serving for a specific revision.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
* `revision_number` (int) : The revision number of the serving.
* `port` (int) : The port of the revision will use for gateway.
* `weight` (int) : The weight of the traffic will be distributed to revision_number.
**Examples**
```python
vessl.update_gateway_for_revision(
organization="my-org",
serving_name="my-serving",
revision_number=1,
port=2222,
weight=100)
```
----
## update_gateway_from_yaml
```python
vessl.update_gateway_from_yaml(
organization: str, serving_name: str, yaml_body: str
)
```
Update the gateway of a serving from a YAML file.
**Args**
* `organization` (str) : The name of the organization.
* `serving_name` (str) : The name of the serving.
* `yaml_body` (str) : The YAML body of the serving.
It is not deserialized YAML, but a whole yaml string
**Examples**
```python
vessl.update_gateway_from_yaml(
organization="my-org",
serving_name="my-serving",
yaml_body=yaml_body)
```
|