Skip to content

selector

Contents

Messages

ResourceSelector

ResourceSelector is used to query resources using the associated infra resources.

Field Type Description
infra_resource_filters repeated ResourceSelector.ResourceFilter Infra_resource_filters is the list of all filters that should be applied to fetch data related to infra resource. Each filter will have AND relationship.

ResourceSelector.ResourceFilter

ResourceFilter is filter for a given resource type.

Field Type Description
resource_type InfraResource.Type Key of key,value pair against which filtering needs to be performs based on associated infra resource type.
op Selector.Operator Op provides the relationship between the key,value pair in the resp element(s).
values repeated string Value of key,value pair against which filtering needs to be performs.

Selector

Selector is used to query resources using the associated labels or field names.

Field Type Description
filters repeated Selector.Filter FilterList is the list of all filters that should be applied.

Selector.Filter

Filter for a given key.

Field Type Description
key string Key of key,value pair against which filtering needs to be performs.
op Selector.Operator Op provides the relationship between the key,value pair in the resp element(s).
values repeated string Value of key,value pair against which filtering needs to be performs if operator is EXIST, value should be an empty array.

Enums

RespData

RespData provides flags which provides info about the fields that should be populated in the response.

Name Number Description
RESP_DATA_UNSPECIFIED 0 RespData Unspecified. complete resource will be populated.
INDEX 1 only uid, name, labels should be populated.
LITE 2 only meta data should be populated.
FULL 3 complete resource should be populated.

Selector.Operator

Operator specifies the relationship between the provided (key,value) pairs in the response.

Name Number Description
OPERATOR_UNSPECIFIED 0 Unspecified, do not use.
IN 1 IN specifies that the key should be associated with atleast 1 of the element in value list.
NOT_IN 2 NOT_IN specifies that the key should not be associated with any of the element in value list.
LIKE 3 LIKE specified that the key should be of a specified pattern

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