Skip to content

Rancher Cluster Security Groups

Operations Summary

Method Endpoint Description
GET /api/rancher-cluster-security-groups/ List Rancher Cluster Security Groups
GET /api/rancher-cluster-security-groups/{uuid}/ Retrieve
PUT /api/rancher-cluster-security-groups/{uuid}/ Update
PATCH /api/rancher-cluster-security-groups/{uuid}/ Partial Update

List Rancher Cluster Security Groups

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-cluster-security-groups/ \
  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_cluster_security_groups import rancher_cluster_security_groups_list # (1)

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

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

try {
  const response = await rancherClusterSecurityGroupsList({
  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
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.

200 -

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

Field Type Description
uuid string (uuid)
name string
description string
rules array of objects
rules.uuid string (uuid)
rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
rules.from_port integer Starting port number in the range (1-65535)
rules.to_port integer Ending port number in the range (1-65535)
rules.cidr string CIDR notation for the source/destination network address range
rules.description string

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/rancher-cluster-security-groups/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_cluster_security_groups import rancher_cluster_security_groups_retrieve # (1)

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

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

try {
  const response = await rancherClusterSecurityGroupsRetrieve({
  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 Description
uuid string (uuid)
name string
description string
rules array of objects
rules.uuid string (uuid)
rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
rules.from_port integer Starting port number in the range (1-65535)
rules.to_port integer Ending port number in the range (1-65535)
rules.cidr string CIDR notation for the source/destination network address range
rules.description string

Update

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/rancher-cluster-security-groups/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  rules:='[]'
 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.cluster_security_group_request import ClusterSecurityGroupRequest # (1)
from waldur_api_client.api.rancher_cluster_security_groups import rancher_cluster_security_groups_update # (2)

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

body_data = ClusterSecurityGroupRequest(
    rules=[]
)
response = rancher_cluster_security_groups_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await rancherClusterSecurityGroupsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "rules": []
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
rules array of objects
rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
rules.from_port integer Starting port number in the range (1-65535)
rules.to_port integer Ending port number in the range (1-65535)
rules.cidr string CIDR notation for the source/destination network address range
rules.description string

200 -

Field Type Description
uuid string (uuid)
name string
description string
rules array of objects
rules.uuid string (uuid)
rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
rules.from_port integer Starting port number in the range (1-65535)
rules.to_port integer Ending port number in the range (1-65535)
rules.cidr string CIDR notation for the source/destination network address range
rules.description string

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/rancher-cluster-security-groups/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_cluster_security_group_request import PatchedClusterSecurityGroupRequest # (1)
from waldur_api_client.api.rancher_cluster_security_groups import rancher_cluster_security_groups_partial_update # (2)

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

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

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

try {
  const response = await rancherClusterSecurityGroupsPartialUpdate({
  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 Description
rules array of objects
rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
rules.from_port integer Starting port number in the range (1-65535)
rules.to_port integer Ending port number in the range (1-65535)
rules.cidr string CIDR notation for the source/destination network address range
rules.description string

200 -

Field Type Description
uuid string (uuid)
name string
description string
rules array of objects
rules.uuid string (uuid)
rules.ethertype any IP protocol version - either 'IPv4' or 'IPv6'
rules.direction any Traffic direction - either 'ingress' (incoming) or 'egress' (outgoing)
rules.protocol any The network protocol (TCP, UDP, ICMP, or empty for any protocol)
rules.from_port integer Starting port number in the range (1-65535)
rules.to_port integer Ending port number in the range (1-65535)
rules.cidr string CIDR notation for the source/destination network address range
rules.description string