#[non_exhaustive]pub struct LogsArchiveCreateRequestDefinition {
pub attributes: Option<LogsArchiveCreateRequestAttributes>,
pub type_: String,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The definition of an 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.attributes: Option<LogsArchiveCreateRequestAttributes>
The attributes associated with the archive.
type_: String
The type of the resource. The value should always be archives.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl LogsArchiveCreateRequestDefinition
impl LogsArchiveCreateRequestDefinition
Sourcepub fn new(type_: String) -> LogsArchiveCreateRequestDefinition
pub fn new(type_: String) -> LogsArchiveCreateRequestDefinition
Examples found in repository?
examples/v2_logs-archives_CreateLogsArchive.rs (line 15)
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 15)
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 attributes(self, value: LogsArchiveCreateRequestAttributes) -> Self
pub fn attributes(self, value: LogsArchiveCreateRequestAttributes) -> Self
Examples found in repository?
examples/v2_logs-archives_CreateLogsArchive.rs (lines 15-34)
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 15-34)
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 LogsArchiveCreateRequestDefinition
impl Clone for LogsArchiveCreateRequestDefinition
Source§fn clone(&self) -> LogsArchiveCreateRequestDefinition
fn clone(&self) -> LogsArchiveCreateRequestDefinition
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 LogsArchiveCreateRequestDefinition
impl<'de> Deserialize<'de> for LogsArchiveCreateRequestDefinition
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 LogsArchiveCreateRequestDefinition
impl PartialEq for LogsArchiveCreateRequestDefinition
Source§fn eq(&self, other: &LogsArchiveCreateRequestDefinition) -> bool
fn eq(&self, other: &LogsArchiveCreateRequestDefinition) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for LogsArchiveCreateRequestDefinition
Auto Trait Implementations§
impl Freeze for LogsArchiveCreateRequestDefinition
impl RefUnwindSafe for LogsArchiveCreateRequestDefinition
impl Send for LogsArchiveCreateRequestDefinition
impl Sync for LogsArchiveCreateRequestDefinition
impl Unpin for LogsArchiveCreateRequestDefinition
impl UnwindSafe for LogsArchiveCreateRequestDefinition
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