#[non_exhaustive]pub struct DatasetCreateRequest {
pub data: DatasetRequest,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Create request for a dataset.
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: DatasetRequest
Datasets Object Constraints
-
Tag limit per dataset:
- Each restricted dataset supports a maximum of 10 key:value pairs per product.
-
Tag key rules per telemetry type:
- Only one tag key or attribute may be used to define access within a single telemetry type.
- The same or different tag key may be used across different telemetry types.
-
Tag value uniqueness:
- Tag values must be unique within a single dataset.
- A tag value used in one dataset cannot be reused in another dataset of the same telemetry type.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl DatasetCreateRequest
impl DatasetCreateRequest
Sourcepub fn new(data: DatasetRequest) -> DatasetCreateRequest
pub fn new(data: DatasetRequest) -> DatasetCreateRequest
Examples found in repository?
examples/v2_datasets_CreateDataset.rs (lines 11-21)
10async fn main() {
11 let body = DatasetCreateRequest::new(DatasetRequest::new(
12 DatasetAttributesRequest::new(
13 "Security Audit Dataset".to_string(),
14 vec!["role:94172442-be03-11e9-a77a-3b7612558ac1".to_string()],
15 vec![FiltersPerProduct::new(
16 vec!["@application.id:ABCD".to_string()],
17 "metrics".to_string(),
18 )],
19 ),
20 "dataset".to_string(),
21 ));
22 let mut configuration = datadog::Configuration::new();
23 configuration.set_unstable_operation_enabled("v2.CreateDataset", true);
24 let api = DatasetsAPI::with_config(configuration);
25 let resp = api.create_dataset(body).await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for DatasetCreateRequest
impl Clone for DatasetCreateRequest
Source§fn clone(&self) -> DatasetCreateRequest
fn clone(&self) -> DatasetCreateRequest
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 DatasetCreateRequest
impl Debug for DatasetCreateRequest
Source§impl<'de> Deserialize<'de> for DatasetCreateRequest
impl<'de> Deserialize<'de> for DatasetCreateRequest
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 DatasetCreateRequest
impl PartialEq for DatasetCreateRequest
Source§impl Serialize for DatasetCreateRequest
impl Serialize for DatasetCreateRequest
impl StructuralPartialEq for DatasetCreateRequest
Auto Trait Implementations§
impl Freeze for DatasetCreateRequest
impl RefUnwindSafe for DatasetCreateRequest
impl Send for DatasetCreateRequest
impl Sync for DatasetCreateRequest
impl Unpin for DatasetCreateRequest
impl UnwindSafe for DatasetCreateRequest
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