#[non_exhaustive]pub struct DatasetUpdateRequest {
pub data: DatasetRequest,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Edit 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 DatasetUpdateRequest
impl DatasetUpdateRequest
Sourcepub fn new(data: DatasetRequest) -> DatasetUpdateRequest
pub fn new(data: DatasetRequest) -> DatasetUpdateRequest
Examples found in repository?
examples/v2_datasets_UpdateDataset.rs (lines 13-23)
10async fn main() {
11 // there is a valid "dataset" in the system
12 let dataset_data_id = std::env::var("DATASET_DATA_ID").unwrap();
13 let body = DatasetUpdateRequest::new(DatasetRequest::new(
14 DatasetAttributesRequest::new(
15 "Security Audit Dataset".to_string(),
16 vec!["role:94172442-be03-11e9-a77a-3b7612558ac1".to_string()],
17 vec![FiltersPerProduct::new(
18 vec!["@application.id:1234".to_string()],
19 "metrics".to_string(),
20 )],
21 ),
22 "dataset".to_string(),
23 ));
24 let mut configuration = datadog::Configuration::new();
25 configuration.set_unstable_operation_enabled("v2.UpdateDataset", true);
26 let api = DatasetsAPI::with_config(configuration);
27 let resp = api.update_dataset(dataset_data_id.clone(), body).await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for DatasetUpdateRequest
impl Clone for DatasetUpdateRequest
Source§fn clone(&self) -> DatasetUpdateRequest
fn clone(&self) -> DatasetUpdateRequest
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 DatasetUpdateRequest
impl Debug for DatasetUpdateRequest
Source§impl<'de> Deserialize<'de> for DatasetUpdateRequest
impl<'de> Deserialize<'de> for DatasetUpdateRequest
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 DatasetUpdateRequest
impl PartialEq for DatasetUpdateRequest
Source§impl Serialize for DatasetUpdateRequest
impl Serialize for DatasetUpdateRequest
impl StructuralPartialEq for DatasetUpdateRequest
Auto Trait Implementations§
impl Freeze for DatasetUpdateRequest
impl RefUnwindSafe for DatasetUpdateRequest
impl Send for DatasetUpdateRequest
impl Sync for DatasetUpdateRequest
impl Unpin for DatasetUpdateRequest
impl UnwindSafe for DatasetUpdateRequest
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