#[non_exhaustive]pub struct ObservabilityPipelineData {
pub attributes: ObservabilityPipelineDataAttributes,
pub id: String,
pub type_: String,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Contains the pipeline’s ID, type, and configuration attributes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.attributes: ObservabilityPipelineDataAttributes
Defines the pipeline’s name and its components (sources, processors, and destinations).
id: String
Unique identifier for the pipeline.
type_: String
The resource type identifier. For pipeline resources, this should always be set to pipelines
.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl ObservabilityPipelineData
impl ObservabilityPipelineData
Sourcepub fn new(
attributes: ObservabilityPipelineDataAttributes,
id: String,
type_: String,
) -> ObservabilityPipelineData
pub fn new( attributes: ObservabilityPipelineDataAttributes, id: String, type_: String, ) -> ObservabilityPipelineData
Examples found in repository?
examples/v2_observability-pipelines_UpdatePipeline.rs (lines 24-66)
19async fn main() {
20 // there is a valid "pipeline" in the system
21 let pipeline_data_id = std::env::var("PIPELINE_DATA_ID").unwrap();
22 let body =
23 ObservabilityPipeline::new(
24 ObservabilityPipelineData::new(
25 ObservabilityPipelineDataAttributes::new(
26 ObservabilityPipelineConfig::new(
27 vec![
28 ObservabilityPipelineConfigDestinationItem::ObservabilityPipelineDatadogLogsDestination(
29 Box::new(
30 ObservabilityPipelineDatadogLogsDestination::new(
31 "updated-datadog-logs-destination-id".to_string(),
32 vec!["filter-processor".to_string()],
33 ObservabilityPipelineDatadogLogsDestinationType::DATADOG_LOGS,
34 ),
35 ),
36 )
37 ],
38 vec![
39 ObservabilityPipelineConfigSourceItem::ObservabilityPipelineDatadogAgentSource(
40 Box::new(
41 ObservabilityPipelineDatadogAgentSource::new(
42 "datadog-agent-source".to_string(),
43 ObservabilityPipelineDatadogAgentSourceType::DATADOG_AGENT,
44 ),
45 ),
46 )
47 ],
48 ).processors(
49 vec![
50 ObservabilityPipelineConfigProcessorItem::ObservabilityPipelineFilterProcessor(
51 Box::new(
52 ObservabilityPipelineFilterProcessor::new(
53 "filter-processor".to_string(),
54 "service:my-service".to_string(),
55 vec!["datadog-agent-source".to_string()],
56 ObservabilityPipelineFilterProcessorType::FILTER,
57 ),
58 ),
59 )
60 ],
61 ),
62 "Updated Pipeline Name".to_string(),
63 ),
64 pipeline_data_id.clone(),
65 "pipelines".to_string(),
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdatePipeline", true);
70 let api = ObservabilityPipelinesAPI::with_config(configuration);
71 let resp = api.update_pipeline(pipeline_data_id.clone(), body).await;
72 if let Ok(value) = resp {
73 println!("{:#?}", value);
74 } else {
75 println!("{:#?}", resp.unwrap_err());
76 }
77}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for ObservabilityPipelineData
impl Clone for ObservabilityPipelineData
Source§fn clone(&self) -> ObservabilityPipelineData
fn clone(&self) -> ObservabilityPipelineData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ObservabilityPipelineData
impl Debug for ObservabilityPipelineData
Source§impl<'de> Deserialize<'de> for ObservabilityPipelineData
impl<'de> Deserialize<'de> for ObservabilityPipelineData
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
impl StructuralPartialEq for ObservabilityPipelineData
Auto Trait Implementations§
impl Freeze for ObservabilityPipelineData
impl RefUnwindSafe for ObservabilityPipelineData
impl Send for ObservabilityPipelineData
impl Sync for ObservabilityPipelineData
impl Unpin for ObservabilityPipelineData
impl UnwindSafe for ObservabilityPipelineData
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