Skip to content

templatedefinition

Contents

TemplateDefinitionService

TemplateDefinitionService which caters to getting template definitions.

GetRevision

rpc GetRevision(.public.portworx.common.v1.GetRevisionRequest) .public.portworx.common.v1.Revision

GetRevision gets the revision details, containing the actual schema.

ListRevisions

rpc ListRevisions(.public.portworx.common.v1.ListRevisionsRequest) .public.portworx.common.v1.ListRevisionsResponse

(-- api-linter: core::0132::http-body=disabled api-linter: core::0132::http-method=disabled aip.dev/not-precedent: We need to do this because we can't have advance filters as query params. --) ListRevisions list the revisions.

ListTemplateKinds

rpc ListTemplateKinds(ListTemplateKindsRequest) ListTemplateKindsResponse

ListTemplateKindRequest: Used to list unique template kind(names).

ListTemplateTypes

rpc ListTemplateTypes(ListTemplateTypesRequest) ListTemplateTypesResponse

ListTemplateTypes API returns the list of all supported template types.

GetTemplateType

rpc GetTemplateType(GetTemplateTypeRequest) TemplateType

GetTemplateType API returns the template type by id.

ListTemplateSamples

rpc ListTemplateSamples(ListTemplateSamplesRequest) ListTemplateSamplesResponse

ListTemplateSamples: Used to list template sample schema.

GetTemplateSample

rpc GetTemplateSample(GetTemplateSampleRequest) TemplateSample

GetTemplateSample API returns the template sample for a given template id.

Messages

GetTemplateSampleRequest

Request to get the template sample resource.

Field Type Description
id string UID of the template sample.

GetTemplateTypeRequest

Request to get template type.

Field Type Description
id string unique id of template type.

Info

Info of sample template.

Field Type Description
kind string Kind of the template
template_values map Info.TemplateValuesEntry template_values of the sample template.

Info.TemplateValuesEntry

Field Type Description
key string none
value string none

ListTemplateKindsRequest

ListTemplateKindResponse listing request.

Field Type Description
semantic_version string Version of the revision, this accepts wild card, eg: 1.*, 1.2.
prefix string Prefix of the kind, eg: pds, pds:application, pds:application:postg.
sort public.portworx.common.v1.Sort Sorting details using which requested list of revisions to be sorted.
pagination public.portworx.common.v1.PageBasedPaginationRequest Pagination parameters for listing revisions.

ListTemplateKindsResponse

ListTemplateKindsResponse listing response.

Field Type Description
kinds repeated string (-- api-linter: core::0132::response-unknown-fields=disabled aip.dev/not-precedent: We need this to list all kinds. --) List of kinds.
pagination public.portworx.common.v1.PageBasedPaginationResponse (-- api-linter: core::0132::response-unknown-fields=disabled aip.dev/not-precedent: We need this field for pagination. --) Pagination metadata for this response.

ListTemplateSamplesRequest

ListTemplateSamplesRequest list templates samples request.

Field Type Description
kind string filter sample templates based on kind, this accepts wild card, eg: pds:service:postgre*
pagination public.portworx.common.v1.PageBasedPaginationRequest Pagination metadata for this request.

ListTemplateSamplesResponse

ListTemplateSamplesResponse list templates samples response.

Field Type Description
template_samples repeated TemplateSample (-- api-linter: core::0132::response-unknown-fields=disabled aip.dev/not-precedent: We need this to list all template samples. --) List of template samples.
pagination public.portworx.common.v1.PageBasedPaginationResponse (-- api-linter: core::0132::response-unknown-fields=disabled aip.dev/not-precedent: We need this field for pagination. --) Pagination metadata for this response.

ListTemplateTypesRequest

Request to list all template types.

Field Type Description
pagination public.portworx.common.v1.PageBasedPaginationRequest Pagination parameters for listing template types.
sort public.portworx.common.v1.Sort Sorting details using which requested list of template types to be sorted.

ListTemplateTypesResponse

Response for list template types.

Field Type Description
template_types repeated TemplateType List of template types.
pagination public.portworx.common.v1.PageBasedPaginationResponse Pagination metadata for this response. (-- api-linter: core::0132::response-unknown-fields=disabled aip.dev/not-precedent: We need this field for pagination. --)

TemplateSample

TemplateSample represents the sample template schema.

Field Type Description
meta public.portworx.common.v1.Meta Metadata of the resource.
info Info Status of the sample templates.

TemplateType

Template type containing id, mame and description.

Field Type Description
uid int64 UID of the template type.
name string Name of the template type.
description string Description of the template type.

Enums

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type

double
double double float

float
float float float

int32
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int

int64
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long

uint32
Uses variable-length encoding. uint32 int int/long

uint64
Uses variable-length encoding. uint64 long int/long

sint32
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int

sint64
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long

fixed32
Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int

fixed64
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long

sfixed32
Always four bytes. int32 int int

sfixed64
Always eight bytes. int64 long int/long

bool
bool boolean boolean

string
A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode

bytes
May contain any arbitrary sequence of bytes. string ByteString str