pub struct DatasetsAPI { /* private fields */ }
Expand description
Data Access Controls in Datadog is a feature that allows administrators and access managers to regulate access to sensitive data. By defining Restricted Datasets, you can ensure that only specific teams or roles can view certain types of telemetry (for example, logs, traces, metrics, and RUM data).
Implementations§
Source§impl DatasetsAPI
impl DatasetsAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
examples/v2_datasets_CreateDataset.rs (line 27)
10async fn main() {
11 let body = DatasetCreateRequest::new(
12 Dataset::new(
13 DatasetAttributes::new(
14 "Security Audit Dataset".to_string(),
15 vec!["role:86245fce-0a4e-11f0-92bd-da7ad0900002".to_string()],
16 vec![FiltersPerProduct::new(
17 vec!["@application.id:ABCD".to_string()],
18 "logs".to_string(),
19 )],
20 )
21 .created_at(None),
22 "dataset".to_string(),
23 )
24 .id("123e4567-e89b-12d3-a456-426614174000".to_string()),
25 );
26 let configuration = datadog::Configuration::new();
27 let api = DatasetsAPI::with_config(configuration);
28 let resp = api.create_dataset(body).await;
29 if let Ok(value) = resp {
30 println!("{:#?}", value);
31 } else {
32 println!("{:#?}", resp.unwrap_err());
33 }
34}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_dataset(
&self,
body: DatasetCreateRequest,
) -> Result<DatasetResponseSingle, Error<CreateDatasetError>>
pub async fn create_dataset( &self, body: DatasetCreateRequest, ) -> Result<DatasetResponseSingle, Error<CreateDatasetError>>
Create a dataset with the configurations in the request.
Examples found in repository?
examples/v2_datasets_CreateDataset.rs (line 28)
10async fn main() {
11 let body = DatasetCreateRequest::new(
12 Dataset::new(
13 DatasetAttributes::new(
14 "Security Audit Dataset".to_string(),
15 vec!["role:86245fce-0a4e-11f0-92bd-da7ad0900002".to_string()],
16 vec![FiltersPerProduct::new(
17 vec!["@application.id:ABCD".to_string()],
18 "logs".to_string(),
19 )],
20 )
21 .created_at(None),
22 "dataset".to_string(),
23 )
24 .id("123e4567-e89b-12d3-a456-426614174000".to_string()),
25 );
26 let configuration = datadog::Configuration::new();
27 let api = DatasetsAPI::with_config(configuration);
28 let resp = api.create_dataset(body).await;
29 if let Ok(value) = resp {
30 println!("{:#?}", value);
31 } else {
32 println!("{:#?}", resp.unwrap_err());
33 }
34}
Sourcepub async fn create_dataset_with_http_info(
&self,
body: DatasetCreateRequest,
) -> Result<ResponseContent<DatasetResponseSingle>, Error<CreateDatasetError>>
pub async fn create_dataset_with_http_info( &self, body: DatasetCreateRequest, ) -> Result<ResponseContent<DatasetResponseSingle>, Error<CreateDatasetError>>
Create a dataset with the configurations in the request.
Sourcepub async fn delete_dataset(
&self,
dataset_id: String,
) -> Result<(), Error<DeleteDatasetError>>
pub async fn delete_dataset( &self, dataset_id: String, ) -> Result<(), Error<DeleteDatasetError>>
Deletes the dataset associated with the ID.
Sourcepub async fn delete_dataset_with_http_info(
&self,
dataset_id: String,
) -> Result<ResponseContent<()>, Error<DeleteDatasetError>>
pub async fn delete_dataset_with_http_info( &self, dataset_id: String, ) -> Result<ResponseContent<()>, Error<DeleteDatasetError>>
Deletes the dataset associated with the ID.
Sourcepub async fn get_all_datasets(
&self,
) -> Result<DatasetResponseMulti, Error<GetAllDatasetsError>>
pub async fn get_all_datasets( &self, ) -> Result<DatasetResponseMulti, Error<GetAllDatasetsError>>
Get all datasets that have been configured for an organization.
Sourcepub async fn get_all_datasets_with_http_info(
&self,
) -> Result<ResponseContent<DatasetResponseMulti>, Error<GetAllDatasetsError>>
pub async fn get_all_datasets_with_http_info( &self, ) -> Result<ResponseContent<DatasetResponseMulti>, Error<GetAllDatasetsError>>
Get all datasets that have been configured for an organization.
Sourcepub async fn get_dataset(
&self,
dataset_id: String,
) -> Result<DatasetResponseSingle, Error<GetDatasetError>>
pub async fn get_dataset( &self, dataset_id: String, ) -> Result<DatasetResponseSingle, Error<GetDatasetError>>
Retrieves the dataset associated with the ID.
Sourcepub async fn get_dataset_with_http_info(
&self,
dataset_id: String,
) -> Result<ResponseContent<DatasetResponseSingle>, Error<GetDatasetError>>
pub async fn get_dataset_with_http_info( &self, dataset_id: String, ) -> Result<ResponseContent<DatasetResponseSingle>, Error<GetDatasetError>>
Retrieves the dataset associated with the ID.
Trait Implementations§
Source§impl Clone for DatasetsAPI
impl Clone for DatasetsAPI
Source§fn clone(&self) -> DatasetsAPI
fn clone(&self) -> DatasetsAPI
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 DatasetsAPI
impl Debug for DatasetsAPI
Auto Trait Implementations§
impl Freeze for DatasetsAPI
impl !RefUnwindSafe for DatasetsAPI
impl Send for DatasetsAPI
impl Sync for DatasetsAPI
impl Unpin for DatasetsAPI
impl !UnwindSafe for DatasetsAPI
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