Skip to content

Component User Usage Limits

Operations Summary

Method Endpoint Description
GET /api/component-user-usage-limits/ List Component User Usage Limits
GET /api/component-user-usage-limits/{uuid}/ Retrieve
POST /api/component-user-usage-limits/ Create
PUT /api/component-user-usage-limits/{uuid}/ Update
PATCH /api/component-user-usage-limits/{uuid}/ Partial Update
DELETE /api/component-user-usage-limits/{uuid}/ Delete

List Component User Usage Limits

1
2
3
4
http \
  GET \
  https://api.example.com/api/component-user-usage-limits/ \
  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.component_user_usage_limits import component_user_usage_limits_list # (1)

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

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

try {
  const response = await componentUserUsageLimitsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
component_type string
offering_uuid string (uuid)
page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
resource string Resource URL
resource_uuid string (uuid)
username string

200 -

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

Field Type Description
url string (uri)
uuid string (uuid)
resource string (uri)
component string (uuid)
component_type string Unique internal name of the measured unit, for example floating_ip.
user string (uri)
limit string (decimal)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/component-user-usage-limits/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.component_user_usage_limits import component_user_usage_limits_retrieve # (1)

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

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

try {
  const response = await componentUserUsageLimitsRetrieve({
  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
url string (uri)
uuid string (uuid)
resource string (uri)
component string (uuid)
component_type string Unique internal name of the measured unit, for example floating_ip.
user string (uri)
limit string (decimal)

Create

1
2
3
4
5
6
7
http \
  POST \
  https://api.example.com/api/component-user-usage-limits/ \
  Authorization:"Token YOUR_API_TOKEN" \
  resource="https://api.example.com/api/resource/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  component="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  user="https://api.example.com/api/user/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 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.component_user_usage_limit_request import ComponentUserUsageLimitRequest # (1)
from waldur_api_client.api.component_user_usage_limits import component_user_usage_limits_create # (2)

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

body_data = ComponentUserUsageLimitRequest(
    resource="https://api.example.com/api/resource/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    component="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    user="https://api.example.com/api/user/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = component_user_usage_limits_create.sync(
    client=client,
    body=body_data
)

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

try {
  const response = await componentUserUsageLimitsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "resource": "https://api.example.com/api/resource/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "component": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "user": "https://api.example.com/api/user/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
resource string (uri)
component string (uuid)
user string (uri)
limit string (decimal)

201 -

Field Type Description
url string (uri)
uuid string (uuid)
resource string (uri)
component string (uuid)
component_type string Unique internal name of the measured unit, for example floating_ip.
user string (uri)
limit string (decimal)

Update

1
2
3
4
5
6
7
http \
  PUT \
  https://api.example.com/api/component-user-usage-limits/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  resource="https://api.example.com/api/resource/a1b2c3d4-e5f6-7890-abcd-ef1234567890/" \
  component="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  user="https://api.example.com/api/user/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.component_user_usage_limit_request import ComponentUserUsageLimitRequest # (1)
from waldur_api_client.api.component_user_usage_limits import component_user_usage_limits_update # (2)

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

body_data = ComponentUserUsageLimitRequest(
    resource="https://api.example.com/api/resource/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    component="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    user="https://api.example.com/api/user/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
)
response = component_user_usage_limits_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

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

try {
  const response = await componentUserUsageLimitsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "resource": "https://api.example.com/api/resource/a1b2c3d4-e5f6-7890-abcd-ef1234567890/",
    "component": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "user": "https://api.example.com/api/user/a1b2c3d4-e5f6-7890-abcd-ef1234567890/"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
resource string (uri)
component string (uuid)
user string (uri)
limit string (decimal)

200 -

Field Type Description
url string (uri)
uuid string (uuid)
resource string (uri)
component string (uuid)
component_type string Unique internal name of the measured unit, for example floating_ip.
user string (uri)
limit string (decimal)

Partial Update

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/component-user-usage-limits/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_component_user_usage_limit_request import PatchedComponentUserUsageLimitRequest # (1)
from waldur_api_client.api.component_user_usage_limits import component_user_usage_limits_partial_update # (2)

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

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

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

try {
  const response = await componentUserUsageLimitsPartialUpdate({
  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
resource string (uri)
component string (uuid)
user string (uri)
limit string (decimal)

200 -

Field Type Description
url string (uri)
uuid string (uuid)
resource string (uri)
component string (uuid)
component_type string Unique internal name of the measured unit, for example floating_ip.
user string (uri)
limit string (decimal)

Delete

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/component-user-usage-limits/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.component_user_usage_limits import component_user_usage_limits_destroy # (1)

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

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

try {
  const response = await componentUserUsageLimitsDestroy({
  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