pub struct DatabasesUpdateUserBodySettingsMongoUserSettings {
pub databases: Vec<String>,
pub role: Option<DatabasesUpdateUserBodySettingsMongoUserSettingsRole>,
}Expand description
MongoDB-specific settings for the user. This option is not currently supported for other database engines.
JSON schema
{
"description": "MongoDB-specific settings for the user. This option is not currently supported for other database engines.",
"type": "object",
"properties": {
"databases": {
"description": "A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases.",
"examples": [
[
"my-db",
"my-db-2"
]
],
"type": "array",
"items": {
"examples": [
"my-db"
],
"type": "string"
}
},
"role": {
"description": "The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role.",
"examples": [
"readOnly"
],
"type": "string",
"enum": [
"readOnly",
"readWrite",
"dbAdmin"
]
}
}
}Fields§
§databases: Vec<String>A list of databases to which the user should have access. When the database is set to admin, the user will have access to all databases based on the user’s role i.e. a user with the role readOnly assigned to the admin database will have read access to all databases.
role: Option<DatabasesUpdateUserBodySettingsMongoUserSettingsRole>The role to assign to the user with each role mapping to a MongoDB built-in role. readOnly maps to a read role. readWrite maps to a readWrite role. dbAdmin maps to a dbAdmin role.
Trait Implementations§
Source§impl Clone for DatabasesUpdateUserBodySettingsMongoUserSettings
impl Clone for DatabasesUpdateUserBodySettingsMongoUserSettings
Source§fn clone(&self) -> DatabasesUpdateUserBodySettingsMongoUserSettings
fn clone(&self) -> DatabasesUpdateUserBodySettingsMongoUserSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for DatabasesUpdateUserBodySettingsMongoUserSettings
impl<'de> Deserialize<'de> for DatabasesUpdateUserBodySettingsMongoUserSettings
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&DatabasesUpdateUserBodySettingsMongoUserSettings> for DatabasesUpdateUserBodySettingsMongoUserSettings
impl From<&DatabasesUpdateUserBodySettingsMongoUserSettings> for DatabasesUpdateUserBodySettingsMongoUserSettings
Source§fn from(value: &DatabasesUpdateUserBodySettingsMongoUserSettings) -> Self
fn from(value: &DatabasesUpdateUserBodySettingsMongoUserSettings) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DatabasesUpdateUserBodySettingsMongoUserSettings
impl RefUnwindSafe for DatabasesUpdateUserBodySettingsMongoUserSettings
impl Send for DatabasesUpdateUserBodySettingsMongoUserSettings
impl Sync for DatabasesUpdateUserBodySettingsMongoUserSettings
impl Unpin for DatabasesUpdateUserBodySettingsMongoUserSettings
impl UnsafeUnpin for DatabasesUpdateUserBodySettingsMongoUserSettings
impl UnwindSafe for DatabasesUpdateUserBodySettingsMongoUserSettings
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
Mutably borrows from an owned value. Read more