Module ocs_rest_res_resource

This library module implements resource handling functions for a REST server in the ocs application.

Copyright © 2016 - 2026 SigScale Global Inc.

Description

This library module implements resource handling functions for a REST server in the ocs application.

Data Types

resource()

resource() = #resource{id = string() | undefined | '$1' | '_', href = string() | undefined | '_', name = string() | undefined | '_' | '$2', description = string() | undefined | '_', category = string() | undefined | '_', class_type = string() | undefined | '_', base_type = string() | undefined | '_', schema = string() | undefined | '_', state = string() | undefined | '_', substate = string() | undefined | '_', version = string() | undefined | '_', start_date = pos_integer() | undefined | '_', end_date = pos_integer() | undefined | '_', last_modified = {TS::pos_integer(), N::pos_integer()} | undefined | '_', related = [resource_rel()] | '_', specification = specification_ref() | undefined | '_', characteristic = [resource_char()] | '_'}

resource_char()

resource_char() = #resource_char{name = string() | undefined | '_', class_type = string() | undefined | '_', schema = string() | undefined | '_', value = term() | undefined | '_'}

resource_rel()

resource_rel() = #resource_rel{id = string() | undefined | '_', href = string() | undefined | '_', name = string() | undefined | '$4' | '_', type = string() | undefined | '_', referred_type = string() | undefined | '_'}

specification_ref()

specification_ref() = #specification_ref{id = string() | undefined | '_' | '$3', href = string() | undefined | '_', name = string() | undefined | '_', version = string() | undefined | '_'}

Function Index

content_types_accepted/0Provides list of resource representations accepted.
content_types_provided/0Provides list of resource representations available.
get_resource_spec/1Respond to GET /resourceCatalogManagement/v2/resourceSpecification/{id}.
get_resource_specs/1Respond to GET /resourceCatalogManagement/v2/resourceSpecification/.
get_resource_category/1Respond to GET /resourceCatalogManagement/v2/resourceCategory/{id}.
get_resource_categories/1Respond to GET /resourceCatalogManagement/v2/resourceCategory/.
get_resource_candidate/1Respond to GET /resourceCatalogManagement/v2/resourceCandidate/{id}.
get_resource_candidates/1Respond to GET /catalogManagement/v2/resourceCandidate/.
get_resource_catalog/1Respond to GET /resourceCatalogManagement/v2/resourceCatalog/{id}.
get_resource_catalogs/1Respond to GET /resourceCatalogManagement/v2/resourceCatalog/.
get_resource/1Respond to GET /resourceInventoryManagement/v1/resource/{id}.
get_resource/2Body producing function for GET /resourceInventoryManagement/v1/resource/ requests.
add_resource/1Respond to POST /resourceInventoryManagement/v1/resource.
get_pla_specs/1Respond to GET /resourceCatalogManagement/v2/plaSpecification/.
delete_resource/1Respond to DELETE /resourceInventoryManagement/v1/resource/{id}' request to remove a table row.
patch_resource/3Respond to PATCH /resourceInventoryManagement/v1/resource/{id}.
resource/1CODEC for Resource.
resource_rel/1*CODEC for ResourceRelationship.
resource_char/1*CODEC for ResourceCharacteristic.
specification_ref/1*CODEC for ResourceSpecificationRef.

Function Details

content_types_accepted/0

content_types_accepted() -> ContentTypes

Provides list of resource representations accepted.

content_types_provided/0

content_types_provided() -> ContentTypes

Provides list of resource representations available.

get_resource_spec/1

get_resource_spec(ID) -> Result

Respond to GET /resourceCatalogManagement/v2/resourceSpecification/{id}. Retrieve a resource specification.

get_resource_specs/1

get_resource_specs(Query) -> Result

Respond to GET /resourceCatalogManagement/v2/resourceSpecification/. Retrieve all resource specifications.

get_resource_category/1

get_resource_category(ID) -> Result

Respond to GET /resourceCatalogManagement/v2/resourceCategory/{id}. Retrieve a Resource category by Id.

get_resource_categories/1

get_resource_categories(Query) -> Result

Respond to GET /resourceCatalogManagement/v2/resourceCategory/. Retrieve all Resource categories.

get_resource_candidate/1

get_resource_candidate(ID) -> Result

Respond to GET /resourceCatalogManagement/v2/resourceCandidate/{id}. Get Resource Candidate by ID.

get_resource_candidates/1

get_resource_candidates(Query) -> Result

Respond to GET /catalogManagement/v2/resourceCandidate/. Retrieve all Resource candidate.

get_resource_catalog/1

get_resource_catalog(ID) -> Result

Respond to GET /resourceCatalogManagement/v2/resourceCatalog/{id}. Get Resource Catalog by ID.

get_resource_catalogs/1

get_resource_catalogs(Query) -> Result

Respond to GET /resourceCatalogManagement/v2/resourceCatalog/. Retrieve all Resource catalogs.

get_resource/1

get_resource(Id) -> Result

Respond to GET /resourceInventoryManagement/v1/resource/{id}. Retrieve resource from inventory management.

get_resource/2

get_resource(Query, RequestHeaders) -> Result

Body producing function for GET /resourceInventoryManagement/v1/resource/ requests.

add_resource/1

add_resource(RequestBody) -> Result

Respond to POST /resourceInventoryManagement/v1/resource. Add a new resource in inventory.

get_pla_specs/1

get_pla_specs(Query) -> Result

Respond to GET /resourceCatalogManagement/v2/plaSpecification/. Retrieve all Pricing Logic Algorithm (PLA) specifications.

delete_resource/1

delete_resource(Id) -> Result

Respond to DELETE /resourceInventoryManagement/v1/resource/{id}' request to remove a table row.

patch_resource/3

patch_resource(Id, Etag, RequestBody) -> Result

Respond to PATCH /resourceInventoryManagement/v1/resource/{id}. Update a table row using JSON patch method.

resource/1

resource(Resource) -> Resource

CODEC for Resource.

resource_rel/1 *

resource_rel(ResourceRelationship) -> ResourceRelationship

CODEC for ResourceRelationship.

resource_char/1 *

resource_char(ResourceCharacteristic) -> ResourceCharacteristic

CODEC for ResourceCharacteristic.

specification_ref/1 *

specification_ref(ResourceSpecificationRef) -> ResourceSpecificationRef

CODEC for ResourceSpecificationRef.


Generated by EDoc