Skip to content

template

Contents

TemplateService

TemplateService serves and manages templates.

GetTemplate

rpc GetTemplate(GetTemplateRequest) Template

Get API returns the template details sans the actual credentials.

CreateTemplate

rpc CreateTemplate(CreateTemplateRequest) Template

Create API creates a set of templates for a Tenant (Organization).

UpdateTemplate

rpc UpdateTemplate(UpdateTemplateRequest) Template

(-- api-linter: core::0134::request-message-name=disabled aip.dev/not-precedent: We need to do this because we have uid in template resource itself. --) Update API updates a template.

ListTemplates

rpc ListTemplates(ListTemplatesRequest) ListTemplatesResponse

(-- 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. --) List API lists all the templates for a Tenant (Organization).

DeleteTemplate

rpc DeleteTemplate(DeleteTemplateRequest) .google.protobuf.Empty

Delete API deletes the templates.

Messages

Config

Config provides configuration data of the template instance.

Field Type Description
kind string Kind to the template instance used to identify the template schema.
semantic_version string Semantic version of the template used to identify template schema. and latest revision for the given template instance kind.
revision_uid string Uid of the schema used to create the template instance.
template_values google.protobuf.Struct Key, value pairs of the template instance.

CreateTemplateRequest

Request to create template instance.

Field Type Description
tenant_id string The parent Tenant (Organization) id under which template will be created. (-- api-linter: core::0133::request-unknown-fields=disabled aip.dev/not-precedent: We need this field for to support creation of the resource in the Tenant (Organization) context. --)
template Template Information about the template instance that needs to be created.

DeleteTemplateRequest

Request to delete a template instance.

Field Type Description
id string ID of the template instance.

GetTemplateRequest

Request to get a template instance.

Field Type Description
id string ID of the template instance.

ListTemplatesRequest

Request to list the templates for a Tenant (Organization).

Field Type Description
tenant_id string Tenant (Organization) ID for which the credentials will be listed.
pagination public.portworx.common.v1.PageBasedPaginationRequest Pagination metadata for this response.
label_selector public.portworx.common.v1.Selector Provides the key in labels and associated values for which templates need to be listed.
field_selector public.portworx.common.v1.Selector Field selector is used to filter templates based on the fields in the template's proto message.
infra_resource_selector public.portworx.common.v1.ResourceSelector Infra_resource_selector is used to filter templates based on the infra resources associated with the templates. Supported infra resource filters: PROJECT.
resp_data public.portworx.common.v1.RespData Response data flags for listing templates.
sort public.portworx.common.v1.Sort Sorting details using which requested list of templates to be sorted.

ListTemplatesResponse

Response of list templates.

Field Type Description
templates repeated Template The list of templates scoped to a Tenant (Organization).
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. --)

Status

Status provides the current status of template.

Field Type Description
phase Status.Phase current state of the template instance.

Template

Resource representing a template.

Field Type Description
meta public.portworx.common.v1.Meta Metadata of the resource.
config Config Desired configuration of the template.
status Status Status of the template instance.

UpdateTemplateRequest

Request to update a template instance.

Field Type Description
template Template Desired template configuration.

Enums

Status.Phase

Different phases of template instance.

Name Number Description
PHASE_UNSPECIFIED 0 Phase unspecified.
ACTIVE 1 Template instance is active.
DEPRECATED 2 Template instance is deprecated.

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