pub struct TcoPoliciesClient { /* private fields */ }
Expand description
The TCO client. Read more at https://coralogix.com/docs/tco-tracing-policy-grpc-api/
Implementations§
source§impl TcoPoliciesClient
impl TcoPoliciesClient
sourcepub fn new(auth_context: AuthContext, region: CoralogixRegion) -> Result<Self>
pub fn new(auth_context: AuthContext, region: CoralogixRegion) -> Result<Self>
Creates a new client for the TCO.
§Arguments
auth_context
- TheAuthContext
to use for authentication.region
- TheCoralogixRegion
to connect to.
sourcepub async fn create(
&self,
name: Option<String>,
description: Option<String>,
priority: i32,
application_rule: Option<Rule>,
subsystem_rule: Option<Rule>,
archive_retention: Option<ArchiveRetention>,
source_type_rules: Option<SourceTypeRules>,
) -> Result<CreatePolicyResponse>
pub async fn create( &self, name: Option<String>, description: Option<String>, priority: i32, application_rule: Option<Rule>, subsystem_rule: Option<Rule>, archive_retention: Option<ArchiveRetention>, source_type_rules: Option<SourceTypeRules>, ) -> Result<CreatePolicyResponse>
Creates a new TCO policy.
§Arguments
name
- The name of the policy.description
- The description of the policy.priority
- The priority of the policy.application_rule
- The applicationRule
of the policy.subsystem_rule
- The subsystemRule
of the policy.archive_retention
- TheArchiveRetention
of the policy.source_type_rules
- TheSourceTypeRules
of the policy.
sourcepub async fn update(
&self,
id: String,
name: Option<String>,
description: Option<String>,
priority: i32,
application_rule: Option<Rule>,
subsystem_rule: Option<Rule>,
archive_retention: Option<ArchiveRetention>,
enabled: Option<bool>,
source_type_rules: Option<SourceTypeRules>,
) -> Result<UpdatePolicyResponse>
pub async fn update( &self, id: String, name: Option<String>, description: Option<String>, priority: i32, application_rule: Option<Rule>, subsystem_rule: Option<Rule>, archive_retention: Option<ArchiveRetention>, enabled: Option<bool>, source_type_rules: Option<SourceTypeRules>, ) -> Result<UpdatePolicyResponse>
Creates a new TCO policy.
§Arguments
id
- The id of the policy.name
- The name of the policy.description
- The description of the policy.priority
- The priority of the policy.application_rule
- The applicationRule
of the policy.subsystem_rule
- The subsystemRule
of the policy.archive_retention
- TheArchiveRetention
of the policy.source_type_rules
- TheSourceTypeRules
of the policy.
sourcepub async fn delete(&self, id: String) -> Result<DeletePolicyResponse>
pub async fn delete(&self, id: String) -> Result<DeletePolicyResponse>
sourcepub async fn get(&self, id: String) -> Result<GetPolicyResponse>
pub async fn get(&self, id: String) -> Result<GetPolicyResponse>
sourcepub async fn list(
&self,
source_type: SourceType,
enabled_only: bool,
) -> Result<GetCompanyPoliciesResponse>
pub async fn list( &self, source_type: SourceType, enabled_only: bool, ) -> Result<GetCompanyPoliciesResponse>
Retrieves a list of TCO policies.
§Arguments
source_type
- TheSourceType
of the policies to retrieve.enabled_only
- Whether to retrieve only enabled policies.
Auto Trait Implementations§
impl !Freeze for TcoPoliciesClient
impl !RefUnwindSafe for TcoPoliciesClient
impl Send for TcoPoliciesClient
impl Sync for TcoPoliciesClient
impl Unpin for TcoPoliciesClient
impl !UnwindSafe for TcoPoliciesClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request