Understanding the applications.edgelq.com service APIv1alpha2, in proto package ntt.applications.v1alpha2.

Service applications.edgelq.com in version v1alpha2, proto package ntt.applications.v1alpha2

Here is the list of resources supported in Applications service APIv1alpha2:

ConfigMap Resource

ConfigMap Resource

Name patterns:

  • projects/{project}/regions/{region}/configMaps/{config_map}

Parent resources:

This section covers the methods and messages to interact with ConfigMap resource.

ConfigMap Methods

Here is the list of ConfigMap resource methods:

GetConfigMap Method

GetConfigMap

rpc GetConfigMap(GetConfigMapRequest) returns (ConfigMap)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/configMaps.get

The equivalent REST API is:

GET /v1alpha2/{name=projects/*/regions/*/configMaps/*} 

BatchGetConfigMaps Method

BatchGetConfigMaps

rpc BatchGetConfigMaps(BatchGetConfigMapsRequest) returns (BatchGetConfigMapsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/configMaps.batchGet

The equivalent REST API is:

GET /v1alpha2/configMaps:batchGet 

ListConfigMaps Method

ListConfigMaps

rpc ListConfigMaps(ListConfigMapsRequest) returns (ListConfigMapsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/configMaps.list

The equivalent REST API is:

GET /v1alpha2/{parent=projects/*/regions/*}/configMaps 

WatchConfigMap Method

WatchConfigMap

rpc WatchConfigMap(WatchConfigMapRequest) returns (WatchConfigMapResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/configMaps.watch

The equivalent REST API is:

POST /v1alpha2/{name=projects/*/regions/*/configMaps/*}:watch 

WatchConfigMaps Method

WatchConfigMaps

rpc WatchConfigMaps(WatchConfigMapsRequest) returns (WatchConfigMapsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/configMaps.watch

The equivalent REST API is:

POST /v1alpha2/{parent=projects/*/regions/*}/configMaps:watch 

CreateConfigMap Method

CreateConfigMap

rpc CreateConfigMap(CreateConfigMapRequest) returns (ConfigMap)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/configMaps.create

The equivalent REST API is:

POST /v1alpha2/{parent=projects/*/regions/*}/configMaps (BODY: config_map)

UpdateConfigMap Method

UpdateConfigMap

rpc UpdateConfigMap(UpdateConfigMapRequest) returns (ConfigMap)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/configMaps.update

The equivalent REST API is:

PUT /v1alpha2/{config_map.name=projects/*/regions/*/configMaps/*} (BODY: config_map)

DeleteConfigMap Method

DeleteConfigMap

rpc DeleteConfigMap(DeleteConfigMapRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/configMaps.delete

The equivalent REST API is:

DELETE /v1alpha2/{name=projects/*/regions/*/configMaps/*} 

ConfigMap Messages

Here is the list of ConfigMap resource messages:

ConfigMap Message

NameTypeDescription
namestring (name of ConfigMap)Name of ConfigMap When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9-]{0,28}[a-z0-9]
display_namestringDisplay name of ConfigMap
metadataMeta
datamap<string, string>Data contains the configuration data. Each key must consist of alphanumeric characters, ‘-’, ‘_’ or ‘.’. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. +optional
binary_datamap<string, bytes>BinaryData contains the binary data. Each key must consist of alphanumeric characters, ‘-’, ‘_’ or ‘.’. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. +optional

GetConfigMapRequest Message

A request message of the GetConfigMap method.

NameTypeDescription
namestring (name of ConfigMap)Name of ntt.applications.v1alpha2.ConfigMap
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetConfigMapsRequest Message

A request message of the BatchGetConfigMaps method.

NameTypeDescription
namesrepeated string (name of ConfigMap)Names of ConfigMaps
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetConfigMapsResponse Message

A response message of the BatchGetConfigMaps method.

NameTypeDescription
config_mapsrepeated ConfigMapfound ConfigMaps
missingrepeated string (name of ConfigMap)list of not found ConfigMaps

ListConfigMapsRequest Message

A request message of the ListConfigMaps method.

NameTypeDescription
parentstring (parent name of ConfigMap)Parent name of ntt.applications.v1alpha2.ConfigMap
page_sizeint32Requested page size. Server may return fewer ConfigMaps than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of ConfigMap)A token identifying a page of results the server should return. Typically, this is the value of ListConfigMapsResponse.next_page_token.
order_bystring (orderBy of ConfigMap)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of ConfigMap)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListConfigMapsResponse Message

A response message of the ListConfigMaps method.

NameTypeDescription
config_mapsrepeated ConfigMapThe list of ConfigMaps
prev_page_tokenstring (cursor of ConfigMap)A token to retrieve previous page of results. Pass this value in the ListConfigMapsRequest.page_token.
next_page_tokenstring (cursor of ConfigMap)A token to retrieve next page of results. Pass this value in the ListConfigMapsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total ConfigMaps across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchConfigMapRequest Message

A request message of the WatchConfigMap method.

NameTypeDescription
namestring (name of ConfigMap)Name of ntt.applications.v1alpha2.ConfigMap
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchConfigMapResponse Message

A response message of the WatchConfigMap method.

NameTypeDescription
changeConfigMapChange

WatchConfigMapsRequest Message

A request message of the WatchConfigMaps method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of ConfigMap)Parent name of ntt.applications.v1alpha2.ConfigMap
page_sizeint32Requested page size. Server may return fewer ConfigMaps than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of ConfigMap)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of ConfigMap)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of ConfigMap)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to ConfigMap that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to ConfigMap that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchConfigMapsResponse Message

A response message of the WatchConfigMaps method.

NameTypeDescription
config_map_changesrepeated ConfigMapChangeChanges of ConfigMaps
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All ConfigMaps will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchConfigMapsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (ConfigMaps will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchConfigMapsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of ConfigMap)New token to retrieve previous page of results.
next_page_tokenstring (cursor of ConfigMap)New token to retrieve next page of results.

CreateConfigMapRequest Message

A request message of the CreateConfigMap method.

NameTypeDescription
parentstring (parent name of ConfigMap)Parent name of ntt.applications.v1alpha2.ConfigMap
config_mapConfigMapConfigMap resource body
response_maskCreateConfigMapRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateConfigMapRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateConfigMapRequest Message

A request message of the UpdateConfigMap method.

NameTypeDescription
config_mapConfigMapConfigMap resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateConfigMapRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateConfigMapRequest.ResponseMaskreduce message response size.

UpdateConfigMapRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateConfigMapConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateConfigMapRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteConfigMapRequest Message

A request message of the DeleteConfigMap method.

NameTypeDescription
namestring (name of ConfigMap)Name of ntt.applications.v1alpha2.ConfigMap
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

Distribution Resource

Distribution Resource

Name patterns:

  • projects/{project}/distributions/{distribution}

Parent resources:

This section covers the methods and messages to interact with Distribution resource.

Distribution Methods

Here is the list of Distribution resource methods:

GetDistribution Method

GetDistribution

rpc GetDistribution(GetDistributionRequest) returns (Distribution)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/distributions.get

The equivalent REST API is:

GET /v1alpha2/{name=projects/*/distributions/*} 

BatchGetDistributions Method

BatchGetDistributions

rpc BatchGetDistributions(BatchGetDistributionsRequest) returns (BatchGetDistributionsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/distributions.batchGet

The equivalent REST API is:

GET /v1alpha2/distributions:batchGet 

ListDistributions Method

ListDistributions

rpc ListDistributions(ListDistributionsRequest) returns (ListDistributionsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/distributions.list

The equivalent REST API is:

GET /v1alpha2/{parent=projects/*}/distributions 

WatchDistribution Method

WatchDistribution

rpc WatchDistribution(WatchDistributionRequest) returns (WatchDistributionResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/distributions.watch

The equivalent REST API is:

POST /v1alpha2/{name=projects/*/distributions/*}:watch 

WatchDistributions Method

WatchDistributions

rpc WatchDistributions(WatchDistributionsRequest) returns (WatchDistributionsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/distributions.watch

The equivalent REST API is:

POST /v1alpha2/{parent=projects/*}/distributions:watch 

CreateDistribution Method

CreateDistribution

rpc CreateDistribution(CreateDistributionRequest) returns (Distribution)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/distributions.create

The equivalent REST API is:

POST /v1alpha2/{parent=projects/*}/distributions (BODY: distribution)

UpdateDistribution Method

UpdateDistribution

rpc UpdateDistribution(UpdateDistributionRequest) returns (Distribution)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/distributions.update

The equivalent REST API is:

PUT /v1alpha2/{distribution.name=projects/*/distributions/*} (BODY: distribution)

DeleteDistribution Method

DeleteDistribution

rpc DeleteDistribution(DeleteDistributionRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/distributions.delete

The equivalent REST API is:

DELETE /v1alpha2/{name=projects/*/distributions/*} 

Distribution Messages

Here is the list of Distribution resource messages:

Distribution Message

NameTypeDescription
namestring (name of Distribution)Name of Distribution When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9-]{0,28}[a-z0-9]
display_namestringDisplay name of Distribution
metadataMeta
specDistribution.Spec
statusDistribution.Status

Distribution.Spec Message

Spec defines the configuration of a Distribution

NameTypeDescription
selectorLabelSelector
templateDistribution.Spec.Templatetemplate defines the probing config to be distributed.

Distribution.Status Message

NameTypeDescription
nonenonenone

Distribution.Spec.Template Message

NameTypeDescription
metadataMeta
specPodSpec

GetDistributionRequest Message

A request message of the GetDistribution method.

NameTypeDescription
namestring (name of Distribution)Name of ntt.applications.v1alpha2.Distribution
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetDistributionsRequest Message

A request message of the BatchGetDistributions method.

NameTypeDescription
namesrepeated string (name of Distribution)Names of Distributions
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetDistributionsResponse Message

A response message of the BatchGetDistributions method.

NameTypeDescription
distributionsrepeated Distributionfound Distributions
missingrepeated string (name of Distribution)list of not found Distributions

ListDistributionsRequest Message

A request message of the ListDistributions method.

NameTypeDescription
parentstring (parent name of Distribution)Parent name of ntt.applications.v1alpha2.Distribution
page_sizeint32Requested page size. Server may return fewer Distributions than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Distribution)A token identifying a page of results the server should return. Typically, this is the value of ListDistributionsResponse.next_page_token.
order_bystring (orderBy of Distribution)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Distribution)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListDistributionsResponse Message

A response message of the ListDistributions method.

NameTypeDescription
distributionsrepeated DistributionThe list of Distributions
prev_page_tokenstring (cursor of Distribution)A token to retrieve previous page of results. Pass this value in the ListDistributionsRequest.page_token.
next_page_tokenstring (cursor of Distribution)A token to retrieve next page of results. Pass this value in the ListDistributionsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Distributions across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchDistributionRequest Message

A request message of the WatchDistribution method.

NameTypeDescription
namestring (name of Distribution)Name of ntt.applications.v1alpha2.Distribution
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchDistributionResponse Message

A response message of the WatchDistribution method.

NameTypeDescription
changeDistributionChange

WatchDistributionsRequest Message

A request message of the WatchDistributions method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of Distribution)Parent name of ntt.applications.v1alpha2.Distribution
page_sizeint32Requested page size. Server may return fewer Distributions than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Distribution)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Distribution)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Distribution)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Distribution that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Distribution that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchDistributionsResponse Message

A response message of the WatchDistributions method.

NameTypeDescription
distribution_changesrepeated DistributionChangeChanges of Distributions
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Distributions will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchDistributionsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Distributions will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchDistributionsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Distribution)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Distribution)New token to retrieve next page of results.

CreateDistributionRequest Message

A request message of the CreateDistribution method.

NameTypeDescription
parentstring (parent name of Distribution)Parent name of ntt.applications.v1alpha2.Distribution
distributionDistributionDistribution resource body
response_maskCreateDistributionRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateDistributionRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateDistributionRequest Message

A request message of the UpdateDistribution method.

NameTypeDescription
distributionDistributionDistribution resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateDistributionRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateDistributionRequest.ResponseMaskreduce message response size.

UpdateDistributionRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateDistributionConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateDistributionRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteDistributionRequest Message

A request message of the DeleteDistribution method.

NameTypeDescription
namestring (name of Distribution)Name of ntt.applications.v1alpha2.Distribution
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

Pod Resource

Pod Resource

Name patterns:

  • projects/{project}/regions/{region}/pods/{pod}

Parent resources:

This section covers the methods and messages to interact with Pod resource.

Pod Methods

Here is the list of Pod resource methods:

GetPod Method

GetPod

rpc GetPod(GetPodRequest) returns (Pod)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/pods.get

The equivalent REST API is:

GET /v1alpha2/{name=projects/*/regions/*/pods/*} 

BatchGetPods Method

BatchGetPods

rpc BatchGetPods(BatchGetPodsRequest) returns (BatchGetPodsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/pods.batchGet

The equivalent REST API is:

GET /v1alpha2/pods:batchGet 

ListPods Method

ListPods

rpc ListPods(ListPodsRequest) returns (ListPodsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/pods.list

The equivalent REST API is:

GET /v1alpha2/{parent=projects/*/regions/*}/pods 

WatchPod Method

WatchPod

rpc WatchPod(WatchPodRequest) returns (WatchPodResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/pods.watch

The equivalent REST API is:

POST /v1alpha2/{name=projects/*/regions/*/pods/*}:watch 

WatchPods Method

WatchPods

rpc WatchPods(WatchPodsRequest) returns (WatchPodsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/pods.watch

The equivalent REST API is:

POST /v1alpha2/{parent=projects/*/regions/*}/pods:watch 

CreatePod Method

CreatePod

rpc CreatePod(CreatePodRequest) returns (Pod)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/pods.create

The equivalent REST API is:

POST /v1alpha2/{parent=projects/*/regions/*}/pods (BODY: pod)

UpdatePod Method

UpdatePod

rpc UpdatePod(UpdatePodRequest) returns (Pod)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/pods.update

The equivalent REST API is:

PUT /v1alpha2/{pod.name=projects/*/regions/*/pods/*} (BODY: pod)

DeletePod Method

DeletePod

rpc DeletePod(DeletePodRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/pods.delete

The equivalent REST API is:

DELETE /v1alpha2/{name=projects/*/regions/*/pods/*} 

Pod Messages

Here is the list of Pod resource messages:

Pod Message

NameTypeDescription
namestring (name of Pod)Name of Pod When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
display_namestringDisplay name of Pod
metadataMeta
specPodSpec
distributionstring (reference to Distribution)Optional managing distribution.
statusPod.Status

Pod.Status Message

Status defines the status of a Pod

NameTypeDescription
phasePod.Status.PhasePhase is the state of the entire Pod.
container_statusesrepeated Pod.Status.Containercontainer_statuses lists individual status of the containers.
errorstringError message if Status.Phase is FAILED.

Pod.Status.Container Message

Container defines status of a Container.

NameTypeDescription
namestringname is the name of the container
statePod.Status.Container.State
waitingPod.Status.Container.StateWaiting
runningPod.Status.Container.StateRunning
terminatedPod.Status.Container.StateTerminated

Pod.Status.Container.StateWaiting Message

NameTypeDescription
reasonstringreason explains why the container is waiting now.
messagestringmessage gives a human readable message that explains the state.

Pod.Status.Container.StateRunning Message

NameTypeDescription
started_at.google.protobuf.Timestampstarted_at indicates when the container started at.

Pod.Status.Container.StateTerminated Message

NameTypeDescription
exit_codeint32exit_code is the exist code that the process returns at the end.
signalint32signal is the signal used to kill the process.
reasonstringreason explains why the container is terminated.
messagestringmessage has detailed human readable message.
started_at.google.protobuf.Timestampstarted_at indicates when the container started at.
finished_at.google.protobuf.Timestampfinished_at indicates when the container exited at.
container_idstringcontainerID is the ID of the container when it was running.

GetPodRequest Message

A request message of the GetPod method.

NameTypeDescription
namestring (name of Pod)Name of ntt.applications.v1alpha2.Pod
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetPodsRequest Message

A request message of the BatchGetPods method.

NameTypeDescription
namesrepeated string (name of Pod)Names of Pods
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetPodsResponse Message

A response message of the BatchGetPods method.

NameTypeDescription
podsrepeated Podfound Pods
missingrepeated string (name of Pod)list of not found Pods

ListPodsRequest Message

A request message of the ListPods method.

NameTypeDescription
parentstring (parent name of Pod)Parent name of ntt.applications.v1alpha2.Pod
page_sizeint32Requested page size. Server may return fewer Pods than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Pod)A token identifying a page of results the server should return. Typically, this is the value of ListPodsResponse.next_page_token.
order_bystring (orderBy of Pod)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Pod)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListPodsResponse Message

A response message of the ListPods method.

NameTypeDescription
podsrepeated PodThe list of Pods
prev_page_tokenstring (cursor of Pod)A token to retrieve previous page of results. Pass this value in the ListPodsRequest.page_token.
next_page_tokenstring (cursor of Pod)A token to retrieve next page of results. Pass this value in the ListPodsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Pods across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchPodRequest Message

A request message of the WatchPod method.

NameTypeDescription
namestring (name of Pod)Name of ntt.applications.v1alpha2.Pod
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchPodResponse Message

A response message of the WatchPod method.

NameTypeDescription
changePodChange

WatchPodsRequest Message

A request message of the WatchPods method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of Pod)Parent name of ntt.applications.v1alpha2.Pod
page_sizeint32Requested page size. Server may return fewer Pods than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Pod)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Pod)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Pod)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Pod that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Pod that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchPodsResponse Message

A response message of the WatchPods method.

NameTypeDescription
pod_changesrepeated PodChangeChanges of Pods
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Pods will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchPodsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Pods will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchPodsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Pod)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Pod)New token to retrieve next page of results.

CreatePodRequest Message

A request message of the CreatePod method.

NameTypeDescription
parentstring (parent name of Pod)Parent name of ntt.applications.v1alpha2.Pod
podPodPod resource body
response_maskCreatePodRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreatePodRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdatePodRequest Message

A request message of the UpdatePod method.

NameTypeDescription
podPodPod resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdatePodRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdatePodRequest.ResponseMaskreduce message response size.

UpdatePodRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_statePodConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdatePodRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeletePodRequest Message

A request message of the DeletePod method.

NameTypeDescription
namestring (name of Pod)Name of ntt.applications.v1alpha2.Pod
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

Pod Enumerations

Here is the list of Pod resource enumerations:

Pod.Status.Phase Enumeration

PodPhase is states of Pod. TODO remove prefixes when the name conflict issue by gogo is resolved

NameDescription
PHASE_UNSPECIFIEDPhaseUnspecified means the Pod is in unknown state. This state is usually not used.
PENDINGPhasePending is used when the Pod is accepted by the system and it’s under processing to be launched.
RUNNINGPhaseRunning indicates all the containers supposed to be running are up and running.
SUCCEEDEDPhaseSucceeded indicates the Pod is terminated however the exit codes of the containers are non-error numbers.
FAILEDPhaseFailed is used when the Pod encountered an issue and some or all of the container are not running.
UNKNOWNPhaseUnknown is used when the assigned node doesn’t respond anymore

Pod.Status.Container.State Enumeration

TODO remove prefixes when the name conflict issue by gogo is resolved

NameDescription
STATE_UNSPECIFIED
WAITING
RUNNING
TERMINATED
UNKNOWN

Project Resource

Project Resource

Name patterns:

  • projects/{project}

This section covers the methods and messages to interact with Project resource.

Project Methods

Here is the list of Project resource methods:

GetProject Method

GetProject

rpc GetProject(GetProjectRequest) returns (Project)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/projects.get

The equivalent REST API is:

GET /v1alpha2/{name=projects/*} 

BatchGetProjects Method

BatchGetProjects

rpc BatchGetProjects(BatchGetProjectsRequest) returns (BatchGetProjectsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/projects.batchGet

The equivalent REST API is:

GET /v1alpha2/projects:batchGet 

ListProjects Method

ListProjects

rpc ListProjects(ListProjectsRequest) returns (ListProjectsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/projects.list

The equivalent REST API is:

GET /v1alpha2/projects 

WatchProject Method

WatchProject

rpc WatchProject(WatchProjectRequest) returns (WatchProjectResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/projects.watch

The equivalent REST API is:

POST /v1alpha2/{name=projects/*}:watch 

WatchProjects Method

WatchProjects

rpc WatchProjects(WatchProjectsRequest) returns (WatchProjectsResponse)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/projects.watch

The equivalent REST API is:

POST /v1alpha2/projects:watch 

CreateProject Method

CreateProject

rpc CreateProject(CreateProjectRequest) returns (Project)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/projects.create

The equivalent REST API is:

POST /v1alpha2/projects (BODY: project)

UpdateProject Method

UpdateProject

rpc UpdateProject(UpdateProjectRequest) returns (Project)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/projects.update

The equivalent REST API is:

PUT /v1alpha2/{project.name=projects/*} (BODY: project)

DeleteProject Method

DeleteProject

rpc DeleteProject(DeleteProjectRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/applications.edgelq.com/permissions/projects.delete

The equivalent REST API is:

DELETE /v1alpha2/{name=projects/*} 

Project Messages

Here is the list of Project resource messages:

Project Message

NameTypeDescription
namestring (name of Project)Name of Project When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9-]{0,28}[a-z0-9]
metadataMetaMetadata
multi_region_policyMultiRegionPolicyMulti region policy

GetProjectRequest Message

A request message of the GetProject method.

NameTypeDescription
namestring (name of Project)Name of ntt.applications.v1alpha2.Project
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetProjectsRequest Message

A request message of the BatchGetProjects method.

NameTypeDescription
namesrepeated string (name of Project)Names of Projects
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetProjectsResponse Message

A response message of the BatchGetProjects method.

NameTypeDescription
projectsrepeated Projectfound Projects
missingrepeated string (name of Project)list of not found Projects

ListProjectsRequest Message

A request message of the ListProjects method.

NameTypeDescription
page_sizeint32Requested page size. Server may return fewer Projects than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Project)A token identifying a page of results the server should return. Typically, this is the value of ListProjectsResponse.next_page_token.
order_bystring (orderBy of Project)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Project)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListProjectsResponse Message

A response message of the ListProjects method.

NameTypeDescription
projectsrepeated ProjectThe list of Projects
prev_page_tokenstring (cursor of Project)A token to retrieve previous page of results. Pass this value in the ListProjectsRequest.page_token.
next_page_tokenstring (cursor of Project)A token to retrieve next page of results. Pass this value in the ListProjectsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Projects across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchProjectRequest Message

A request message of the WatchProject method.

NameTypeDescription
namestring (name of Project)Name of ntt.applications.v1alpha2.Project
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchProjectResponse Message

A response message of the WatchProject method.

NameTypeDescription
changeProjectChange

WatchProjectsRequest Message

A request message of the WatchProjects method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
page_sizeint32Requested page size. Server may return fewer Projects than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Project)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Project)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Project)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Project that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Project that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchProjectsResponse Message

A response message of the WatchProjects method.

NameTypeDescription
project_changesrepeated ProjectChangeChanges of Projects
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Projects will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchProjectsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Projects will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchProjectsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Project)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Project)New token to retrieve next page of results.

CreateProjectRequest Message

A request message of the CreateProject method.

NameTypeDescription
projectProjectProject resource body
response_maskCreateProjectRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateProjectRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateProjectRequest Message

A request message of the UpdateProject method.

NameTypeDescription
projectProjectProject resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateProjectRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateProjectRequest.ResponseMaskreduce message response size.

UpdateProjectRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateProjectConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateProjectRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteProjectRequest Message

A request message of the DeleteProject method.

NameTypeDescription
namestring (name of Project)Name of ntt.applications.v1alpha2.Project
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

Applications Service Shared Methods and Messages

Applications Service Shared Messages

Here is the list of Applications service shared messages:

ConfigMapChange Message

ConfigMapChange is used by Watch notifications Responses to describe change of single ConfigMap One of Added, Modified, Removed

NameTypeDescription
addedConfigMapChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedConfigMapChange.ModifiedModified is returned when watched document is modified
currentConfigMapChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedConfigMapChange.RemovedRemoved is returned when ConfigMap is deleted or leaves Query view

ConfigMapChange.Added Message

ConfigMap has been added to query view

NameTypeDescription
config_mapConfigMap
view_indexint32Integer describing index of added ConfigMap in resulting query view.

ConfigMapChange.Current Message

ConfigMap has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
config_mapConfigMap

ConfigMapChange.Modified Message

ConfigMap changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of ConfigMap)Name of modified ConfigMap
config_mapConfigMapNew version of ConfigMap or masked difference, depending on mask_changes instrumentation of issued [WatchConfigMapRequest] or [WatchConfigMapsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified ConfigMap. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying ConfigMap new index in resulting query view.

ConfigMapChange.Removed Message

Removed is returned when ConfigMap is deleted or leaves Query view

NameTypeDescription
namestring (name of ConfigMap)
view_indexint32Integer specifying removed ConfigMap index. Not populated in stateless watch type.

ConfigMapEnvSource Message

ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.

The contents of the target ConfigMap’s Data field will represent the key-value pairs as environment variables.

NameTypeDescription
namestringThe ConfigMap to select from.
optionalboolSpecify whether the ConfigMap must be defined

ConfigMapKeySelector Message

NameTypeDescription
namestringThe ConfigMap to select from.
keystringThe key to select.
optionalboolSpecify whether the ConfigMap or its key must be defined

ConfigMapVolumeSource Message

Adapts a ConfigMap into a volume.

The contents of the target ConfigMap’s Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.

NameTypeDescription
namestring
itemsrepeated KeyToPathIf unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the ‘..’ path or start with ‘..’.
default_modeint32Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
optionalboolSpecify whether the ConfigMap or its keys must be defined

DistributionChange Message

DistributionChange is used by Watch notifications Responses to describe change of single Distribution One of Added, Modified, Removed

NameTypeDescription
addedDistributionChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedDistributionChange.ModifiedModified is returned when watched document is modified
currentDistributionChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedDistributionChange.RemovedRemoved is returned when Distribution is deleted or leaves Query view

DistributionChange.Added Message

Distribution has been added to query view

NameTypeDescription
distributionDistribution
view_indexint32Integer describing index of added Distribution in resulting query view.

DistributionChange.Current Message

Distribution has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
distributionDistribution

DistributionChange.Modified Message

Distribution changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Distribution)Name of modified Distribution
distributionDistributionNew version of Distribution or masked difference, depending on mask_changes instrumentation of issued [WatchDistributionRequest] or [WatchDistributionsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Distribution. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Distribution new index in resulting query view.

DistributionChange.Removed Message

Removed is returned when Distribution is deleted or leaves Query view

NameTypeDescription
namestring (name of Distribution)
view_indexint32Integer specifying removed Distribution index. Not populated in stateless watch type.

EnvFromSource Message

EnvFromSource represents the source of a set of ConfigMaps

NameTypeDescription
prefixstringAn optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
config_map_refConfigMapEnvSourceThe ConfigMap to select from
secret_refSecretEnvSourceThe Secret to select from

EnvVar Message

EnvVar is a key value pair for environment variables.

NameTypeDescription
namestringname is the name of the environment variable.
valuestringvalue is the value of the environment variable.
value_fromEnvVarSourceSource for the environment variable’s value. Cannot be used if value is not empty.

EnvVarSource Message

EnvVarSource represents a source for the value of an EnvVar.

NameTypeDescription
config_map_key_refConfigMapKeySelectorSelects a key of a ConfigMap.
secret_key_refSecretKeySelectorSelects a key of a secret in the pod’s namespace

HostPathVolumeSource Message

Represents a host path mapped into a pod.

NameTypeDescription
pathstringPath of the directory on the host. If the path is a symlink, it will follow the link to the real path.
typeHostPathVolumeSource.TypeType for HostPath Volume

KeyToPath Message

Maps a string key to a path within a volume.

NameTypeDescription
keystringThe key to project.
pathstringThe relative path of the file to map the key to. May not be an absolute path. May not contain the path element ‘..’. May not start with the string ‘..’.
modeint32Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.

LabelSelector Message

A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.

NameTypeDescription
match_labelsmap<string, string>matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed. +optional
match_expressionsrepeated LabelSelectorRequirementmatchExpressions is a list of label selector requirements. The requirements are ANDed. +optional

LabelSelectorRequirement Message

A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

NameTypeDescription
keystringkey is the label key that the selector applies to. +patchMergeKey=key +patchStrategy=merge
operatorstringoperator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
valuesrepeated stringvalues is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. +optional

LocalObjectReferenceSecret Message

LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.

NameTypeDescription
namestring (reference to Secret)Name of the referent.

PodChange Message

PodChange is used by Watch notifications Responses to describe change of single Pod One of Added, Modified, Removed

NameTypeDescription
addedPodChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedPodChange.ModifiedModified is returned when watched document is modified
currentPodChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedPodChange.RemovedRemoved is returned when Pod is deleted or leaves Query view

PodChange.Added Message

Pod has been added to query view

NameTypeDescription
podPod
view_indexint32Integer describing index of added Pod in resulting query view.

PodChange.Current Message

Pod has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
podPod

PodChange.Modified Message

Pod changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Pod)Name of modified Pod
podPodNew version of Pod or masked difference, depending on mask_changes instrumentation of issued [WatchPodRequest] or [WatchPodsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Pod. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Pod new index in resulting query view.

PodChange.Removed Message

Removed is returned when Pod is deleted or leaves Query view

NameTypeDescription
namestring (name of Pod)
view_indexint32Integer specifying removed Pod index. Not populated in stateless watch type.

PodSpec Message

PodSpec defines the configuration of a Pod

NameTypeDescription
nodestring (reference to Device)node is the name of the target node that the Pod is meant to be deployed to.
containersrepeated PodSpec.Containercontainers defines list of containers that the Pod launches.
host_networkboolContainers use the host network.
restart_policyPodSpec.RestartPolicy
image_pull_secretsrepeated LocalObjectReferenceSecretImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored.
volumesrepeated VolumeList of volumes that can be mounted by containers belonging to the pod.
composestringCompose file as a string. When this value is provided, you can manage containers directlry using Docker Compose. Other values in the Spec expect node will be ignored.
host_volume_mountsrepeated VolumeMountHostVolumeMounts defines volumes to be mounted to the host file system.

PodSpec.Container Message

Container defines configuration of a Container.

NameTypeDescription
argsrepeated stringargs to run the command.
commandrepeated stringcommand to run the container. The image default command will be used when it’s not given.
envrepeated EnvVarenv is additional environment variables passed to the container.
imagestringimage is the URL of the container image.
image_pull_policystring
namestringname is the name of the container. Must be unique in the Pod.
resourcesPodSpec.Container.ResourceRequirements
security_contextSecurityContextSecurity options the pod should run with.
volume_mountsrepeated VolumeMountPod volumes to mount into the container’s filesystem. Cannot be updated.
envFromEnvFromSourceList of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.

PodSpec.Container.ResourceRequirements Message

NameTypeDescription
limitsmap<string, int64>todo: change to k8s.io.apimachinery.pkg.api.resource.
requestsmap<string, int64>

ProjectChange Message

ProjectChange is used by Watch notifications Responses to describe change of single Project One of Added, Modified, Removed

NameTypeDescription
addedProjectChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedProjectChange.ModifiedModified is returned when watched document is modified
currentProjectChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedProjectChange.RemovedRemoved is returned when Project is deleted or leaves Query view

ProjectChange.Added Message

Project has been added to query view

NameTypeDescription
projectProject
view_indexint32Integer describing index of added Project in resulting query view.

ProjectChange.Current Message

Project has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
projectProject

ProjectChange.Modified Message

Project changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Project)Name of modified Project
projectProjectNew version of Project or masked difference, depending on mask_changes instrumentation of issued [WatchProjectRequest] or [WatchProjectsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Project. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Project new index in resulting query view.

ProjectChange.Removed Message

Removed is returned when Project is deleted or leaves Query view

NameTypeDescription
namestring (name of Project)
view_indexint32Integer specifying removed Project index. Not populated in stateless watch type.

SecretEnvSource Message

SecretEnvSource selects a Secret to populate the environment variables with.

The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.

NameTypeDescription
namestringThe Secret to select from.
optionalboolSpecify whether the Secret must be defined

SecretKeySelector Message

SecretKeySelector selects a key of a Secret.

NameTypeDescription
namestringThe name of the secret in the pod’s namespace to select from.
keystringThe key of the secret to select from. Must be a valid secret key.
optionalboolSpecify whether the Secret or its key must be defined

SecretVolumeSource Message

Adapts a Secret into a volume.

The contents of the target Secret’s Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.

NameTypeDescription
secret_namestringName of the secret in the pod’s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
itemsrepeated KeyToPathIf unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the ‘..’ path or start with ‘..’. +optional
default_modeint32Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
optionalboolSpecify whether the Secret or its keys must be defined

SecurityContext Message

PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.

NameTypeDescription
privilegedboolRun container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.

Volume Message

Volume represents a named volume in a pod that may be accessed by any container in the pod.

NameTypeDescription
namestringVolume’s name. Must be a DNS_LABEL and unique within the pod.
host_pathHostPathVolumeSourceHostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this.
secretSecretVolumeSourceSecret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
config_mapConfigMapVolumeSourceConfigMap represents a configMap that should populate this volume

VolumeMount Message

VolumeMount describes a mounting of a Volume within a container.

NameTypeDescription
namestringThis must match the Name of a Volume.
read_onlyboolMounted read-only if true, read-write otherwise (false or unspecified). Defaults to false.
mount_pathstringPath within the container at which the volume should be mounted. Must not contain ‘:’.
sub_pathstringPath within the volume from which the container’s volume should be mounted. Defaults to "" (volume’s root).

Applications Service Shared Enumerations

Here is the list of Applications service shared enumerations:

HostPathVolumeSource.Type Enumeration

NameDescription
TYPE_UNSPECIFIEDTYPE_UNSPECIFIED is not used. Type must be set to one of the concreate values.
DIRECTORY_OR_CREATEIf nothing exists at the given path, an empty directory will be created there as needed with permission set to 0755, having the same group and ownership with Droplet.
DIRECTORYA directory must exist at the given path
FILE_OR_CREATEIf nothing exists at the given path, an empty file will be created there as needed with permission set to 0644, having the same group and ownership with Droplet.
FILEA file must exist at the given path
SOCKETA UNIX socket must exist at the given path
CHAR_DEVICEA character device must exist at the given path
BLOCK_DEVICEA block device must exist at the given path

PodSpec.RestartPolicy Enumeration

NameDescription
RESTART_POLICY_UNSPECIFIED
ALWAYS
ON_FAILURE
NEVER