#[non_exhaustive]pub struct LogsArchiveCreateRequest {
pub data: Option<LogsArchiveCreateRequestDefinition>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The logs 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.data: Option<LogsArchiveCreateRequestDefinition>
The definition of an archive.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl LogsArchiveCreateRequest
impl LogsArchiveCreateRequest
Sourcepub fn new() -> LogsArchiveCreateRequest
pub fn new() -> LogsArchiveCreateRequest
Examples found in repository?
examples/v2_logs-archives_CreateLogsArchive.rs (line 14)
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 14)
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 data(self, value: LogsArchiveCreateRequestDefinition) -> Self
pub fn data(self, value: LogsArchiveCreateRequestDefinition) -> Self
Examples found in repository?
examples/v2_logs-archives_CreateLogsArchive.rs (lines 14-35)
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 14-35)
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 LogsArchiveCreateRequest
impl Clone for LogsArchiveCreateRequest
Source§fn clone(&self) -> LogsArchiveCreateRequest
fn clone(&self) -> LogsArchiveCreateRequest
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 LogsArchiveCreateRequest
impl Debug for LogsArchiveCreateRequest
Source§impl Default for LogsArchiveCreateRequest
impl Default for LogsArchiveCreateRequest
Source§impl<'de> Deserialize<'de> for LogsArchiveCreateRequest
impl<'de> Deserialize<'de> for LogsArchiveCreateRequest
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 LogsArchiveCreateRequest
impl PartialEq for LogsArchiveCreateRequest
Source§impl Serialize for LogsArchiveCreateRequest
impl Serialize for LogsArchiveCreateRequest
impl StructuralPartialEq for LogsArchiveCreateRequest
Auto Trait Implementations§
impl Freeze for LogsArchiveCreateRequest
impl RefUnwindSafe for LogsArchiveCreateRequest
impl Send for LogsArchiveCreateRequest
impl Sync for LogsArchiveCreateRequest
impl Unpin for LogsArchiveCreateRequest
impl UnwindSafe for LogsArchiveCreateRequest
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