#[non_exhaustive]pub struct Rotation {
pub next_rotation_time: Option<Timestamp>,
pub rotation_period: Option<Duration>,
/* private fields */
}Expand description
The rotation time and period for a Secret. At next_rotation_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.next_rotation_time: Option<Timestamp>Optional. Timestamp in UTC at which the Secret is scheduled to rotate. Cannot be set to less than 300s (5 min) in the future and at most 3153600000s (100 years).
next_rotation_time MUST be set if rotation_period is set.
rotation_period: Option<Duration>Input only. The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
If rotation_period is set, next_rotation_time must be set. next_rotation_time will be advanced by this period when the service automatically sends rotation notifications.
Implementations§
Source§impl Rotation
impl Rotation
pub fn new() -> Self
Sourcepub fn set_next_rotation_time<T>(self, v: T) -> Self
pub fn set_next_rotation_time<T>(self, v: T) -> Self
Sets the value of next_rotation_time.
§Example
use wkt::Timestamp;
let x = Rotation::new().set_next_rotation_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_next_rotation_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_next_rotation_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of next_rotation_time.
§Example
use wkt::Timestamp;
let x = Rotation::new().set_or_clear_next_rotation_time(Some(Timestamp::default()/* use setters */));
let x = Rotation::new().set_or_clear_next_rotation_time(None::<Timestamp>);Sourcepub fn set_rotation_period<T>(self, v: T) -> Self
pub fn set_rotation_period<T>(self, v: T) -> Self
Sets the value of rotation_period.
§Example
use wkt::Duration;
let x = Rotation::new().set_rotation_period(Duration::default()/* use setters */);Sourcepub fn set_or_clear_rotation_period<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_rotation_period<T>(self, v: Option<T>) -> Self
Sets or clears the value of rotation_period.
§Example
use wkt::Duration;
let x = Rotation::new().set_or_clear_rotation_period(Some(Duration::default()/* use setters */));
let x = Rotation::new().set_or_clear_rotation_period(None::<Duration>);