pldpro_sdk.api_client.ReservationCatalogApi
All URIs are relative to http://localhost:8086
| Method | HTTP request | Description |
|---|---|---|
| create_reservation_catalog | POST /api/v1/reservation-catalogs | Cria um registro no catálogo de reservas |
| delete_reservation_catalog | DELETE /api/v1/reservation-catalogs/{reservationId} | Remove um registro do catálogo pela reservationId |
| get_all_reservation_catalogs | GET /api/v1/reservation-catalogs | Lista os registros do catálogo de reservas |
| get_reservation_catalog_by_reservation_id | GET /api/v1/reservation-catalogs/{reservationId} | Busca um registro do catálogo pela reservationId |
| get_reservation_catalog_capacity | GET /api/v1/reservation-catalogs/{reservationId}/capacity | Consulta a capacidade atual de uma reserva |
| update_reservation_catalog | PUT /api/v1/reservation-catalogs/{reservationId} | Atualiza um registro do catálogo pela reservationId |
create_reservation_catalog
ReservationCatalogResponse create_reservation_catalog(reservation_catalog_request)
Cria um registro no catálogo de reservas
Cadastra uma nova reserva no reservation_catalog.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_catalog_request import ReservationCatalogRequest
from pldpro_sdk.api_client.models.reservation_catalog_response import ReservationCatalogResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.ReservationCatalogApi(api_client)
reservation_catalog_request = {reservationId=reserva-dc-01, projectId=PEP123456, description=Reserva prioritária do time de estudos, enabled=true, maxConcurrentUsage=4, defaultCoresPerNode=128, priority=10, environment=DATACENTER, notes=Uso restrito ao horário comercial} # ReservationCatalogRequest |
try:
# Cria um registro no catálogo de reservas
api_response = api_instance.create_reservation_catalog(reservation_catalog_request)
print("The response of ReservationCatalogApi->create_reservation_catalog:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ReservationCatalogApi->create_reservation_catalog: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| reservation_catalog_request | ReservationCatalogRequest |
Return type
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: application/json
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Registro do catálogo de reservas criado com sucesso. | - |
| 400 | Erro ao criar registro do catálogo de reservas | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_reservation_catalog
delete_reservation_catalog(reservation_id)
Remove um registro do catálogo pela reservationId
Exclui um registro de reservation_catalog identificado pelo campo lógico reservationId.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.ReservationCatalogApi(api_client)
reservation_id = 'reservation_id_example' # str | Identificador lógico da reserva no catálogo
try:
# Remove um registro do catálogo pela reservationId
api_instance.delete_reservation_catalog(reservation_id)
except Exception as e:
print("Exception when calling ReservationCatalogApi->delete_reservation_catalog: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| reservation_id | str | Identificador lógico da reserva no catálogo |
Return type
void (empty response body)
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 204 | Registro do catálogo removido com sucesso. Nenhum conteúdo retornado. | - |
| 400 | Erro ao remover registro do catálogo | - |
| 404 | Registro do catálogo não encontrado | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_all_reservation_catalogs
List[ReservationCatalogResponse] get_all_reservation_catalogs()
Lista os registros do catálogo de reservas
Retorna todos os registros cadastrados em reservation_catalog, ordenados por prioridade e identificador lógico da reserva.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_catalog_response import ReservationCatalogResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.ReservationCatalogApi(api_client)
try:
# Lista os registros do catálogo de reservas
api_response = api_instance.get_all_reservation_catalogs()
print("The response of ReservationCatalogApi->get_all_reservation_catalogs:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ReservationCatalogApi->get_all_reservation_catalogs: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
List[ReservationCatalogResponse]
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Lista do catálogo de reservas retornada com sucesso. | - |
| 400 | Erro ao listar catálogo de reservas | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_reservation_catalog_by_reservation_id
ReservationCatalogResponse get_reservation_catalog_by_reservation_id(reservation_id)
Busca um registro do catálogo pela reservationId
Retorna os detalhes de uma reserva cadastrada em reservation_catalog, identificada pelo campo lógico reservationId.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_catalog_response import ReservationCatalogResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.ReservationCatalogApi(api_client)
reservation_id = 'reservation_id_example' # str | Identificador lógico da reserva no catálogo
try:
# Busca um registro do catálogo pela reservationId
api_response = api_instance.get_reservation_catalog_by_reservation_id(reservation_id)
print("The response of ReservationCatalogApi->get_reservation_catalog_by_reservation_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ReservationCatalogApi->get_reservation_catalog_by_reservation_id: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| reservation_id | str | Identificador lógico da reserva no catálogo |
Return type
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, /
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Registro do catálogo encontrado com sucesso. | - |
| 400 | Erro ao buscar registro do catálogo | - |
| 404 | Registro do catálogo não encontrado | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_reservation_catalog_capacity
ReservationCapacityResponse get_reservation_catalog_capacity(reservation_id)
Consulta a capacidade atual de uma reserva
Retorna a capacidade configurada e o uso ativo atual de uma reserva cadastrada em reservation_catalog.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_capacity_response import ReservationCapacityResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.ReservationCatalogApi(api_client)
reservation_id = 'reservation_id_example' # str | Identificador lógico da reserva no catálogo
try:
# Consulta a capacidade atual de uma reserva
api_response = api_instance.get_reservation_catalog_capacity(reservation_id)
print("The response of ReservationCatalogApi->get_reservation_catalog_capacity:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ReservationCatalogApi->get_reservation_catalog_capacity: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| reservation_id | str | Identificador lógico da reserva no catálogo |
Return type
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, /
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Capacidade da reserva retornada com sucesso. | - |
| 400 | Erro ao consultar capacidade da reserva | - |
| 404 | Registro do catálogo não encontrado | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_reservation_catalog
ReservationCatalogResponse update_reservation_catalog(reservation_id, reservation_catalog_request)
Atualiza um registro do catálogo pela reservationId
Atualiza os dados de uma reserva cadastrada em reservation_catalog, identificada pelo campo lógico reservationId.
Example
- Api Key Authentication (1_tenant):
- Api Key Authentication (4_roles):
- Bearer (JWT) Authentication (security_auth):
- Api Key Authentication (2_user):
- Api Key Authentication (ApiKeyAuth):
- Api Key Authentication (3_user_id):
import pldpro_sdk.api_client
from pldpro_sdk.api_client.models.reservation_catalog_request import ReservationCatalogRequest
from pldpro_sdk.api_client.models.reservation_catalog_response import ReservationCatalogResponse
from pldpro_sdk.api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8086
# See configuration.py for a list of all supported configuration parameters.
configuration = pldpro_sdk.api_client.Configuration(
host = "http://localhost:8086"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: 1_tenant
configuration.api_key['1_tenant'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['1_tenant'] = 'Bearer'
# Configure API key authorization: 4_roles
configuration.api_key['4_roles'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['4_roles'] = 'Bearer'
# Configure Bearer authorization (JWT): security_auth
configuration = pldpro_sdk.api_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: 2_user
configuration.api_key['2_user'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['2_user'] = 'Bearer'
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Configure API key authorization: 3_user_id
configuration.api_key['3_user_id'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['3_user_id'] = 'Bearer'
# Enter a context with an instance of the API client
with pldpro_sdk.api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pldpro_sdk.api_client.ReservationCatalogApi(api_client)
reservation_id = 'reservation_id_example' # str | Identificador lógico atual da reserva no catálogo
reservation_catalog_request = {"reservationId":"reserva-dc-01","projectId":"PEP123456","description":"Reserva prioritária do time de estudos","enabled":true,"maxConcurrentUsage":4,"defaultCoresPerNode":128,"priority":10,"environment":"DATACENTER","notes":"Uso restrito ao horário comercial"} # ReservationCatalogRequest |
try:
# Atualiza um registro do catálogo pela reservationId
api_response = api_instance.update_reservation_catalog(reservation_id, reservation_catalog_request)
print("The response of ReservationCatalogApi->update_reservation_catalog:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ReservationCatalogApi->update_reservation_catalog: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| reservation_id | str | Identificador lógico atual da reserva no catálogo | |
| reservation_catalog_request | ReservationCatalogRequest |
Return type
Authorization
1_tenant, 4_roles, security_auth, 2_user, ApiKeyAuth, 3_user_id
HTTP request headers
- Content-Type: application/json
- Accept: application/json, /
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | Registro do catálogo atualizado com sucesso. | - |
| 400 | Erro ao atualizar registro do catálogo | - |
| 404 | Registro do catálogo não encontrado | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]