#[non_exhaustive]pub struct LogsArchiveCreateRequestAttributes {
pub destination: LogsArchiveCreateRequestDestination,
pub include_tags: Option<bool>,
pub name: String,
pub query: String,
pub rehydration_max_scan_size_in_gb: Option<Option<i64>>,
pub rehydration_tags: Option<Vec<String>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The attributes associated with the archive.
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.destination: LogsArchiveCreateRequestDestination
An archive’s destination.
To store the tags in the archive, set the value “true”. If it is set to “false”, the tags will be deleted when the logs are sent to the archive.
name: String
The archive name.
query: String
The archive query/filter. Logs matching this query are included in the archive.
rehydration_max_scan_size_in_gb: Option<Option<i64>>
Maximum scan size for rehydration from this archive.
An array of tags to add to rehydrated logs from an archive.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl LogsArchiveCreateRequestAttributes
impl LogsArchiveCreateRequestAttributes
Sourcepub fn new(
destination: LogsArchiveCreateRequestDestination,
name: String,
query: String,
) -> LogsArchiveCreateRequestAttributes
pub fn new( destination: LogsArchiveCreateRequestDestination, name: String, query: String, ) -> LogsArchiveCreateRequestAttributes
Examples found in repository?
examples/v2_logs-archives_CreateLogsArchive.rs (lines 16-30)
13async fn main() {
14 let body = LogsArchiveCreateRequest::new().data(
15 LogsArchiveCreateRequestDefinition::new("archives".to_string()).attributes(
16 LogsArchiveCreateRequestAttributes::new(
17 LogsArchiveCreateRequestDestination::LogsArchiveDestinationAzure(Box::new(
18 LogsArchiveDestinationAzure::new(
19 "container-name".to_string(),
20 LogsArchiveIntegrationAzure::new(
21 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
22 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
23 ),
24 "account-name".to_string(),
25 LogsArchiveDestinationAzureType::AZURE,
26 ),
27 )),
28 "Nginx Archive".to_string(),
29 "source:nginx".to_string(),
30 )
31 .include_tags(false)
32 .rehydration_max_scan_size_in_gb(Some(100))
33 .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]),
34 ),
35 );
36 let configuration = datadog::Configuration::new();
37 let api = LogsArchivesAPI::with_config(configuration);
38 let resp = api.create_logs_archive(body).await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
More examples
examples/v2_logs-archives_UpdateLogsArchive.rs (lines 16-30)
13async fn main() {
14 let body = LogsArchiveCreateRequest::new().data(
15 LogsArchiveCreateRequestDefinition::new("archives".to_string()).attributes(
16 LogsArchiveCreateRequestAttributes::new(
17 LogsArchiveCreateRequestDestination::LogsArchiveDestinationAzure(Box::new(
18 LogsArchiveDestinationAzure::new(
19 "container-name".to_string(),
20 LogsArchiveIntegrationAzure::new(
21 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
22 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
23 ),
24 "account-name".to_string(),
25 LogsArchiveDestinationAzureType::AZURE,
26 ),
27 )),
28 "Nginx Archive".to_string(),
29 "source:nginx".to_string(),
30 )
31 .include_tags(false)
32 .rehydration_max_scan_size_in_gb(Some(100))
33 .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]),
34 ),
35 );
36 let configuration = datadog::Configuration::new();
37 let api = LogsArchivesAPI::with_config(configuration);
38 let resp = api
39 .update_logs_archive("archive_id".to_string(), body)
40 .await;
41 if let Ok(value) = resp {
42 println!("{:#?}", value);
43 } else {
44 println!("{:#?}", resp.unwrap_err());
45 }
46}
Examples found in repository?
examples/v2_logs-archives_CreateLogsArchive.rs (line 31)
13async fn main() {
14 let body = LogsArchiveCreateRequest::new().data(
15 LogsArchiveCreateRequestDefinition::new("archives".to_string()).attributes(
16 LogsArchiveCreateRequestAttributes::new(
17 LogsArchiveCreateRequestDestination::LogsArchiveDestinationAzure(Box::new(
18 LogsArchiveDestinationAzure::new(
19 "container-name".to_string(),
20 LogsArchiveIntegrationAzure::new(
21 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
22 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
23 ),
24 "account-name".to_string(),
25 LogsArchiveDestinationAzureType::AZURE,
26 ),
27 )),
28 "Nginx Archive".to_string(),
29 "source:nginx".to_string(),
30 )
31 .include_tags(false)
32 .rehydration_max_scan_size_in_gb(Some(100))
33 .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]),
34 ),
35 );
36 let configuration = datadog::Configuration::new();
37 let api = LogsArchivesAPI::with_config(configuration);
38 let resp = api.create_logs_archive(body).await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
More examples
examples/v2_logs-archives_UpdateLogsArchive.rs (line 31)
13async fn main() {
14 let body = LogsArchiveCreateRequest::new().data(
15 LogsArchiveCreateRequestDefinition::new("archives".to_string()).attributes(
16 LogsArchiveCreateRequestAttributes::new(
17 LogsArchiveCreateRequestDestination::LogsArchiveDestinationAzure(Box::new(
18 LogsArchiveDestinationAzure::new(
19 "container-name".to_string(),
20 LogsArchiveIntegrationAzure::new(
21 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
22 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
23 ),
24 "account-name".to_string(),
25 LogsArchiveDestinationAzureType::AZURE,
26 ),
27 )),
28 "Nginx Archive".to_string(),
29 "source:nginx".to_string(),
30 )
31 .include_tags(false)
32 .rehydration_max_scan_size_in_gb(Some(100))
33 .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]),
34 ),
35 );
36 let configuration = datadog::Configuration::new();
37 let api = LogsArchivesAPI::with_config(configuration);
38 let resp = api
39 .update_logs_archive("archive_id".to_string(), body)
40 .await;
41 if let Ok(value) = resp {
42 println!("{:#?}", value);
43 } else {
44 println!("{:#?}", resp.unwrap_err());
45 }
46}
Sourcepub fn rehydration_max_scan_size_in_gb(self, value: Option<i64>) -> Self
pub fn rehydration_max_scan_size_in_gb(self, value: Option<i64>) -> Self
Examples found in repository?
examples/v2_logs-archives_CreateLogsArchive.rs (line 32)
13async fn main() {
14 let body = LogsArchiveCreateRequest::new().data(
15 LogsArchiveCreateRequestDefinition::new("archives".to_string()).attributes(
16 LogsArchiveCreateRequestAttributes::new(
17 LogsArchiveCreateRequestDestination::LogsArchiveDestinationAzure(Box::new(
18 LogsArchiveDestinationAzure::new(
19 "container-name".to_string(),
20 LogsArchiveIntegrationAzure::new(
21 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
22 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
23 ),
24 "account-name".to_string(),
25 LogsArchiveDestinationAzureType::AZURE,
26 ),
27 )),
28 "Nginx Archive".to_string(),
29 "source:nginx".to_string(),
30 )
31 .include_tags(false)
32 .rehydration_max_scan_size_in_gb(Some(100))
33 .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]),
34 ),
35 );
36 let configuration = datadog::Configuration::new();
37 let api = LogsArchivesAPI::with_config(configuration);
38 let resp = api.create_logs_archive(body).await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
More examples
examples/v2_logs-archives_UpdateLogsArchive.rs (line 32)
13async fn main() {
14 let body = LogsArchiveCreateRequest::new().data(
15 LogsArchiveCreateRequestDefinition::new("archives".to_string()).attributes(
16 LogsArchiveCreateRequestAttributes::new(
17 LogsArchiveCreateRequestDestination::LogsArchiveDestinationAzure(Box::new(
18 LogsArchiveDestinationAzure::new(
19 "container-name".to_string(),
20 LogsArchiveIntegrationAzure::new(
21 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
22 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
23 ),
24 "account-name".to_string(),
25 LogsArchiveDestinationAzureType::AZURE,
26 ),
27 )),
28 "Nginx Archive".to_string(),
29 "source:nginx".to_string(),
30 )
31 .include_tags(false)
32 .rehydration_max_scan_size_in_gb(Some(100))
33 .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]),
34 ),
35 );
36 let configuration = datadog::Configuration::new();
37 let api = LogsArchivesAPI::with_config(configuration);
38 let resp = api
39 .update_logs_archive("archive_id".to_string(), body)
40 .await;
41 if let Ok(value) = resp {
42 println!("{:#?}", value);
43 } else {
44 println!("{:#?}", resp.unwrap_err());
45 }
46}
Examples found in repository?
examples/v2_logs-archives_CreateLogsArchive.rs (line 33)
13async fn main() {
14 let body = LogsArchiveCreateRequest::new().data(
15 LogsArchiveCreateRequestDefinition::new("archives".to_string()).attributes(
16 LogsArchiveCreateRequestAttributes::new(
17 LogsArchiveCreateRequestDestination::LogsArchiveDestinationAzure(Box::new(
18 LogsArchiveDestinationAzure::new(
19 "container-name".to_string(),
20 LogsArchiveIntegrationAzure::new(
21 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
22 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
23 ),
24 "account-name".to_string(),
25 LogsArchiveDestinationAzureType::AZURE,
26 ),
27 )),
28 "Nginx Archive".to_string(),
29 "source:nginx".to_string(),
30 )
31 .include_tags(false)
32 .rehydration_max_scan_size_in_gb(Some(100))
33 .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]),
34 ),
35 );
36 let configuration = datadog::Configuration::new();
37 let api = LogsArchivesAPI::with_config(configuration);
38 let resp = api.create_logs_archive(body).await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
More examples
examples/v2_logs-archives_UpdateLogsArchive.rs (line 33)
13async fn main() {
14 let body = LogsArchiveCreateRequest::new().data(
15 LogsArchiveCreateRequestDefinition::new("archives".to_string()).attributes(
16 LogsArchiveCreateRequestAttributes::new(
17 LogsArchiveCreateRequestDestination::LogsArchiveDestinationAzure(Box::new(
18 LogsArchiveDestinationAzure::new(
19 "container-name".to_string(),
20 LogsArchiveIntegrationAzure::new(
21 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
22 "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa".to_string(),
23 ),
24 "account-name".to_string(),
25 LogsArchiveDestinationAzureType::AZURE,
26 ),
27 )),
28 "Nginx Archive".to_string(),
29 "source:nginx".to_string(),
30 )
31 .include_tags(false)
32 .rehydration_max_scan_size_in_gb(Some(100))
33 .rehydration_tags(vec!["team:intake".to_string(), "team:app".to_string()]),
34 ),
35 );
36 let configuration = datadog::Configuration::new();
37 let api = LogsArchivesAPI::with_config(configuration);
38 let resp = api
39 .update_logs_archive("archive_id".to_string(), body)
40 .await;
41 if let Ok(value) = resp {
42 println!("{:#?}", value);
43 } else {
44 println!("{:#?}", resp.unwrap_err());
45 }
46}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for LogsArchiveCreateRequestAttributes
impl Clone for LogsArchiveCreateRequestAttributes
Source§fn clone(&self) -> LogsArchiveCreateRequestAttributes
fn clone(&self) -> LogsArchiveCreateRequestAttributes
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<'de> Deserialize<'de> for LogsArchiveCreateRequestAttributes
impl<'de> Deserialize<'de> for LogsArchiveCreateRequestAttributes
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 PartialEq for LogsArchiveCreateRequestAttributes
impl PartialEq for LogsArchiveCreateRequestAttributes
Source§fn eq(&self, other: &LogsArchiveCreateRequestAttributes) -> bool
fn eq(&self, other: &LogsArchiveCreateRequestAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for LogsArchiveCreateRequestAttributes
Auto Trait Implementations§
impl Freeze for LogsArchiveCreateRequestAttributes
impl RefUnwindSafe for LogsArchiveCreateRequestAttributes
impl Send for LogsArchiveCreateRequestAttributes
impl Sync for LogsArchiveCreateRequestAttributes
impl Unpin for LogsArchiveCreateRequestAttributes
impl UnwindSafe for LogsArchiveCreateRequestAttributes
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