Skip to content

Rancher Hpas

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/rancher-hpas/ List Rancher Hpas
GET /api/rancher-hpas/{uuid}/ Retrieve
POST /api/rancher-hpas/ Create
POST /api/rancher-hpas/{uuid}/pull/ Synchronize resource state
POST /api/rancher-hpas/{uuid}/unlink/ Unlink resource
PUT /api/rancher-hpas/{uuid}/ Update
PATCH /api/rancher-hpas/{uuid}/ Partial Update
DELETE /api/rancher-hpas/{uuid}/ Delete
Other Actions
GET /api/rancher-hpas/{uuid}/yaml/ Yaml
PUT /api/rancher-hpas/{uuid}/yaml/ Yaml

Core CRUD

List Rancher Hpas

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-hpas/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.rancher_hpas import rancher_hpas_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = rancher_hpas_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: rancher_hpas_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { rancherHpasList } from 'waldur-js-client';

try {
  const response = await rancherHpasList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
cluster_uuid string (uuid)
name string
name_exact string
namespace_uuid string (uuid)
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
project_uuid string (uuid)
settings string
settings_uuid string (uuid)
workload_uuid string (uuid)

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
url string (uri)
uuid string (uuid)
name string
description string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
workload string (uri)
workload_uuid string (uuid)
workload_name string
min_replicas integer
max_replicas integer
current_replicas integer
desired_replicas integer
metrics any

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-hpas/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.rancher_hpas import rancher_hpas_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = rancher_hpas_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: rancher_hpas_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { rancherHpasRetrieve } from 'waldur-js-client';

try {
  const response = await rancherHpasRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
workload string (uri)
workload_uuid string (uuid)
workload_name string
min_replicas integer
max_replicas integer
current_replicas integer
desired_replicas integer
metrics any

Create

1
2
3
4
5
6
http \
  POST \
  https://api.example.com/api/rancher-hpas/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-rancher-hpa" \
  metrics=null
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.rancher_hpa_request import RancherHPARequest # (1)
from waldur_api_client.api.rancher_hpas import rancher_hpas_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = RancherHPARequest(
    name="my-awesome-rancher-hpa",
    metrics=null
)
response = rancher_hpas_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: RancherHPARequest
  2. API Source: rancher_hpas_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import { rancherHpasCreate } from 'waldur-js-client';

try {
  const response = await rancherHpasCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "name": "my-awesome-rancher-hpa",
    "metrics": null
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
name string
description string
workload string (uri)
min_replicas integer
max_replicas integer
metrics any

201 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
workload string (uri)
workload_uuid string (uuid)
workload_name string
min_replicas integer
max_replicas integer
current_replicas integer
desired_replicas integer
metrics any

Synchronize resource state

Schedule an asynchronous pull operation to synchronize resource state from the backend. Returns 202 if the pull was scheduled successfully, or 409 if the pull operation is not implemented for this resource type.

1
2
3
4
http \
  POST \
  https://api.example.com/api/rancher-hpas/a1b2c3d4-e5f6-7890-abcd-ef1234567890/pull/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.rancher_hpas import rancher_hpas_pull # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = rancher_hpas_pull.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: rancher_hpas_pull
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { rancherHpasPull } from 'waldur-js-client';

try {
  const response = await rancherHpasPull({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

202 - No response body


409 - No response body


Delete resource from the database without scheduling operations on backend and without checking current state of the resource. It is intended to be used for removing resource stuck in transitioning state.

1
2
3
4
http \
  POST \
  https://api.example.com/api/rancher-hpas/a1b2c3d4-e5f6-7890-abcd-ef1234567890/unlink/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.rancher_hpas import rancher_hpas_unlink # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = rancher_hpas_unlink.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: rancher_hpas_unlink
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { rancherHpasUnlink } from 'waldur-js-client';

try {
  const response = await rancherHpasUnlink({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Update

1
2
3
4
5
6
http \
  PUT \
  https://api.example.com/api/rancher-hpas/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-rancher-hpa" \
  metrics=null
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.rancher_hpa_request import RancherHPARequest # (1)
from waldur_api_client.api.rancher_hpas import rancher_hpas_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = RancherHPARequest(
    name="my-awesome-rancher-hpa",
    metrics=null
)
response = rancher_hpas_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: RancherHPARequest
  2. API Source: rancher_hpas_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import { rancherHpasUpdate } from 'waldur-js-client';

try {
  const response = await rancherHpasUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-rancher-hpa",
    "metrics": null
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string
workload string (uri)
min_replicas integer
max_replicas integer
metrics any

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
workload string (uri)
workload_uuid string (uuid)
workload_name string
min_replicas integer
max_replicas integer
current_replicas integer
desired_replicas integer
metrics any

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/rancher-hpas/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_rancher_hpa_request import PatchedRancherHPARequest # (1)
from waldur_api_client.api.rancher_hpas import rancher_hpas_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedRancherHPARequest()
response = rancher_hpas_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedRancherHPARequest
  2. API Source: rancher_hpas_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { rancherHpasPartialUpdate } from 'waldur-js-client';

try {
  const response = await rancherHpasPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string
workload string (uri)
min_replicas integer
max_replicas integer
metrics any

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
workload string (uri)
workload_uuid string (uuid)
workload_name string
min_replicas integer
max_replicas integer
current_replicas integer
desired_replicas integer
metrics any

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/rancher-hpas/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.rancher_hpas import rancher_hpas_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = rancher_hpas_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: rancher_hpas_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { rancherHpasDestroy } from 'waldur-js-client';

try {
  const response = await rancherHpasDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Other Actions

Yaml

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-hpas/a1b2c3d4-e5f6-7890-abcd-ef1234567890/yaml/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.rancher_hpas import rancher_hpas_yaml_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = rancher_hpas_yaml_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: rancher_hpas_yaml_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { rancherHpasYamlRetrieve } from 'waldur-js-client';

try {
  const response = await rancherHpasYamlRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
workload string (uri)
workload_uuid string (uuid)
workload_name string
min_replicas integer
max_replicas integer
current_replicas integer
desired_replicas integer
metrics any

Yaml

1
2
3
4
5
6
http \
  PUT \
  https://api.example.com/api/rancher-hpas/a1b2c3d4-e5f6-7890-abcd-ef1234567890/yaml/ \
  Authorization:"Token YOUR_API_TOKEN" \
  name="my-awesome-rancher-hpa" \
  metrics=null
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.rancher_hpa_request import RancherHPARequest # (1)
from waldur_api_client.api.rancher_hpas import rancher_hpas_yaml_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = RancherHPARequest(
    name="my-awesome-rancher-hpa",
    metrics=null
)
response = rancher_hpas_yaml_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: RancherHPARequest
  2. API Source: rancher_hpas_yaml_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import { rancherHpasYamlUpdate } from 'waldur-js-client';

try {
  const response = await rancherHpasYamlUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "name": "my-awesome-rancher-hpa",
    "metrics": null
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
name string
description string
workload string (uri)
min_replicas integer
max_replicas integer
metrics any

200 -

Field Type
url string (uri)
uuid string (uuid)
name string
description string
created string (date-time)
modified string (date-time)
runtime_state string
cluster string (uri)
cluster_uuid string (uuid)
cluster_name string
project string (uri)
project_uuid string (uuid)
project_name string
namespace string (uri)
namespace_uuid string (uuid)
namespace_name string
workload string (uri)
workload_uuid string (uuid)
workload_name string
min_replicas integer
max_replicas integer
current_replicas integer
desired_replicas integer
metrics any