pub struct NewPackagePolicy { /* private fields */ }Expand description
A package policy in the simplified format, for Fleet::create_package_policy
and, through replacing, Fleet::update_package_policy.
Unset inputs use package defaults. Debug output omits variable values.
Implementations§
Source§impl NewPackagePolicy
impl NewPackagePolicy
pub fn new( name: impl Into<String>, namespace: impl Into<String>, package: PackageRef, ) -> Self
Sourcepub fn policy_id(self, id: impl Into<String>) -> Self
pub fn policy_id(self, id: impl Into<String>) -> Self
Assigns the package policy to an agent policy. Repeat for several policies.
Sourcepub fn input(self, name: impl Into<String>, input: PolicyInput) -> Self
pub fn input(self, name: impl Into<String>, input: PolicyInput) -> Self
Configures an input by name, such as system-logfile.
pub fn description(self, description: impl Into<String>) -> Self
Sourcepub fn replacing<'p>(&'p self, id: &'p str) -> PackagePolicyUpdate<'p>
pub fn replacing<'p>(&'p self, id: &'p str) -> PackagePolicyUpdate<'p>
Replaces the whole of package policy id with this definition. Existing
configuration this definition does not set reverts to package defaults;
to change a retrieved policy instead, use PackagePolicy::edit.
Trait Implementations§
Source§impl Clone for NewPackagePolicy
impl Clone for NewPackagePolicy
Source§impl Debug for NewPackagePolicy
impl Debug for NewPackagePolicy
Auto Trait Implementations§
impl Freeze for NewPackagePolicy
impl RefUnwindSafe for NewPackagePolicy
impl Send for NewPackagePolicy
impl Sync for NewPackagePolicy
impl Unpin for NewPackagePolicy
impl UnsafeUnpin for NewPackagePolicy
impl UnwindSafe for NewPackagePolicy
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