pub struct Database {Show 13 fields
pub create_time: Option<DateTime<Utc>>,
pub database_dialect: Option<String>,
pub default_leader: Option<String>,
pub earliest_version_time: Option<DateTime<Utc>>,
pub enable_drop_protection: Option<bool>,
pub encryption_config: Option<EncryptionConfig>,
pub encryption_info: Option<Vec<EncryptionInfo>>,
pub name: Option<String>,
pub quorum_info: Option<QuorumInfo>,
pub reconciling: Option<bool>,
pub restore_info: Option<RestoreInfo>,
pub state: Option<String>,
pub version_retention_period: Option<String>,
}
Expand description
A Cloud Spanner database.
§Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).
- instances databases get projects (response)
- instances databases patch projects (request)
Fields§
§create_time: Option<DateTime<Utc>>
Output only. If exists, the time at which the database creation started.
database_dialect: Option<String>
Output only. The dialect of the Cloud Spanner Database.
default_leader: Option<String>
Output only. The read-write region which contains the database’s leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
earliest_version_time: Option<DateTime<Utc>>
Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.
enable_drop_protection: Option<bool>
Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to prevent accidental database deletion.
encryption_config: Option<EncryptionConfig>
Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.
encryption_info: Option<Vec<EncryptionInfo>>
Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The encryption_status' field inside of each
EncryptionInfo` is not populated. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.
name: Option<String>
Required. The name of the database. Values are of the form projects//instances//databases/
, where `` is as specified in the CREATE DATABASE
statement. This name can be passed to other API methods to identify the database.
quorum_info: Option<QuorumInfo>
Output only. Applicable only for databases that use dual region instance configurations. Contains information about the quorum.
reconciling: Option<bool>
Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.
restore_info: Option<RestoreInfo>
Output only. Applicable only for restored databases. Contains information about the restore source.
state: Option<String>
Output only. The current database state.
version_retention_period: Option<String>
Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Database
impl<'de> Deserialize<'de> for Database
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl RequestValue for Database
impl ResponseResult for Database
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more