Skip to content

Protobuf Data Models

Protocol Buffers (Protobuf) is a method of serializing structured data. For writing your own set of rules, the following sections provide the Protobuf data models for each service to ensure your JavaScript code is both syntactically and logically correct.

Cloud Database Instance

SecureCloudDB refers to the wire model for a single database object as DatabaseInstanceHistory.

Note

When using the model names via your own logic, please convert the name from snake_case_format to camelCaseFormat

Table of Contents

Top

protos/clouddb/wire/database_instance_history.proto

AwsDatabaseInstanceSettings

Provider-specific mutable configuration for an AWS database instance.

Field Type Label Description
rds_database_instance aws.rds.RdsDatabaseInstanceSettings AWS RDS specific database instance information
dynamo_db_instance aws.dynamodb.DynamoDbTableSettings AWS DynamoDb specific table instance information
elasticsearch_domain aws.elasticsearch.AwsElasticsearchDomainStatus AWS elasticsearch domain information
elasticache_cluster aws.elasticache.AwsElasticacheCluster AWS ElastiCache cluster information
rds_cluster aws.rds.RdsClusterSettings AWS Aurora cluster information
redshift_cluster aws.redshift.RedshiftClusterSettings

DatabaseInstanceHistory

Wire model definition for SecureCloudDB cloud database instance history.

Field Type Label Description
ref string Unique reference for this database instance history
database_instance_ref string Which database instance this belongs to
settings DatabaseInstanceSettings Cloud provider-specific configuration settings for the database instance
tags Tag repeated Tags to apply to this config
created_at google.protobuf.Timestamp When this database instances was updated

DatabaseInstanceSettings

Provider-specific mutable configuration for a database instance.

Field Type Label Description
aws_database_instance AwsDatabaseInstanceSettings AWS specific database instance information
server_settings ServerSettings Configuration of the DB server independent of Cloud Providers. This is populated in the following manner: 1. For MySQL (>5.6): SELECT VARIABLE_NAME, VARIABLE_VALUE FROM PERFORMANCE_SCHEMA.global_variables; 2. For MySQL (<5.6): SELECT VARIABLE_NAME, VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES; 3. For Postgres: SELECT name, setting from pg_settings;
server_extensions ServerExtensions Extensions installed onto or available to the Database server independent of Cloud Providers. This is populated in the following manner: 1. For MySQL SELECT * FROM INFORMATION_SCHEMA.plugins; 2. For Postgres: SELECT extname as name, extversion as version, 'installed' as status FROM pg_extension UNION DISTINCT SELECT name, default_version as version, 'available' as status FROM pg_available_extensions WHERE name not in (SELECT extname from pg_extension)
users DbUserHistory repeated Information about users from the database themselves, does not contain IAM information (though it could in the future).

ServerExtensions

Database server extensions.

Field Type Label Description
extensions ServerExtensions.ExtensionsEntry repeated The currently installed extensions / plugins, but plugin name.

ServerExtensions.Extension

Field Type Label Description
name string The server-reported plugin name.
version string The server-reported version
status string Platform dependent status string Available, installed, etc.
type string For systems that support different types of extensions or plugins, the engine-specific type.

ServerExtensions.ExtensionsEntry

Field Type Label Description
key string
value ServerExtensions.Extension

ServerSettings

Database key-value configuration

Field Type Label Description
settings ServerSettings.SettingsEntry repeated The current settings, keyed by setting name.

ServerSettings.Setting

Field Type Label Description
name string The name of the setting.
current_value string The current value of the setting.
source string The source (config file etc).

ServerSettings.SettingsEntry

Field Type Label Description
key string
value ServerSettings.Setting

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 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 int32 int integer Bignum or Fixnum (as required)
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 int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)