pub struct SoftwareCatalogAPI { /* private fields */ }
Expand description
API to create, update, retrieve, and delete Software Catalog entities.
Implementations§
Source§impl SoftwareCatalogAPI
impl SoftwareCatalogAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
examples/v2_software-catalog_DeleteCatalogEntity.rs (line 8)
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = SoftwareCatalogAPI::with_config(configuration);
9 let resp = api
10 .delete_catalog_entity("service:myservice".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
More examples
examples/v2_software-catalog_ListCatalogEntity.rs (line 9)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = SoftwareCatalogAPI::with_config(configuration);
10 let resp = api
11 .list_catalog_entity(ListCatalogEntityOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
examples/v2_software-catalog_ListCatalogEntity_2305103326.rs (line 11)
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = SoftwareCatalogAPI::with_config(configuration);
12 let response =
13 api.list_catalog_entity_with_pagination(ListCatalogEntityOptionalParams::default());
14 pin_mut!(response);
15 while let Some(resp) = response.next().await {
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21 }
22}
examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs (line 69)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("service-examplesoftwarecatalog".to_string())
31 .additional_owners(vec![])
32 .contacts(vec![EntityV3MetadataContactsItems::new(
33 "https://slack/".to_string(),
34 "slack".to_string(),
35 )])
36 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
37 .inherit_from("application:default/myapp".to_string())
38 .links(vec![EntityV3MetadataLinksItems::new(
39 "mylink".to_string(),
40 "link".to_string(),
41 "https://mylink".to_string(),
42 )])
43 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
44 )
45 .datadog(
46 EntityV3ServiceDatadog::new()
47 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
48 .events(vec![EntityV3DatadogEventItem::new()])
49 .logs(vec![EntityV3DatadogLogItem::new()])
50 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
51 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
52 )
53 .integrations(
54 EntityV3Integrations::new()
55 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
56 "https://www.opsgenie.com/service/shopping-cart".to_string(),
57 ))
58 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
59 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
60 )),
61 )
62 .spec(
63 EntityV3ServiceSpec::new()
64 .depends_on(vec![])
65 .languages(vec![]),
66 ),
67 ))));
68 let configuration = datadog::Configuration::new();
69 let api = SoftwareCatalogAPI::with_config(configuration);
70 let resp = api.upsert_catalog_entity(body).await;
71 if let Ok(value) = resp {
72 println!("{:#?}", value);
73 } else {
74 println!("{:#?}", resp.unwrap_err());
75 }
76}
examples/v2_software-catalog_UpsertCatalogEntity.rs (line 73)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("myService".to_string())
31 .additional_owners(vec![EntityV3MetadataAdditionalOwnersItems::new(
32 "".to_string(),
33 )])
34 .contacts(vec![EntityV3MetadataContactsItems::new(
35 "https://slack/".to_string(),
36 "slack".to_string(),
37 )])
38 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
39 .inherit_from("application:default/myapp".to_string())
40 .links(vec![EntityV3MetadataLinksItems::new(
41 "mylink".to_string(),
42 "link".to_string(),
43 "https://mylink".to_string(),
44 )])
45 .namespace("default".to_string())
46 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
47 )
48 .datadog(
49 EntityV3ServiceDatadog::new()
50 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
51 .events(vec![EntityV3DatadogEventItem::new()])
52 .logs(vec![EntityV3DatadogLogItem::new()])
53 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
54 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
55 )
56 .integrations(
57 EntityV3Integrations::new()
58 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
59 "https://www.opsgenie.com/service/shopping-cart".to_string(),
60 ))
61 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
62 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
63 )),
64 )
65 .spec(
66 EntityV3ServiceSpec::new()
67 .component_of(vec![])
68 .depends_on(vec![])
69 .languages(vec![]),
70 ),
71 ))));
72 let configuration = datadog::Configuration::new();
73 let api = SoftwareCatalogAPI::with_config(configuration);
74 let resp = api.upsert_catalog_entity(body).await;
75 if let Ok(value) = resp {
76 println!("{:#?}", value);
77 } else {
78 println!("{:#?}", resp.unwrap_err());
79 }
80}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn delete_catalog_entity(
&self,
entity_id: String,
) -> Result<(), Error<DeleteCatalogEntityError>>
pub async fn delete_catalog_entity( &self, entity_id: String, ) -> Result<(), Error<DeleteCatalogEntityError>>
Delete a single entity in Software Catalog.
Examples found in repository?
examples/v2_software-catalog_DeleteCatalogEntity.rs (line 10)
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = SoftwareCatalogAPI::with_config(configuration);
9 let resp = api
10 .delete_catalog_entity("service:myservice".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
Sourcepub async fn delete_catalog_entity_with_http_info(
&self,
entity_id: String,
) -> Result<ResponseContent<()>, Error<DeleteCatalogEntityError>>
pub async fn delete_catalog_entity_with_http_info( &self, entity_id: String, ) -> Result<ResponseContent<()>, Error<DeleteCatalogEntityError>>
Delete a single entity in Software Catalog.
Sourcepub async fn list_catalog_entity(
&self,
params: ListCatalogEntityOptionalParams,
) -> Result<ListEntityCatalogResponse, Error<ListCatalogEntityError>>
pub async fn list_catalog_entity( &self, params: ListCatalogEntityOptionalParams, ) -> Result<ListEntityCatalogResponse, Error<ListCatalogEntityError>>
Get a list of entities from Software Catalog.
Examples found in repository?
examples/v2_software-catalog_ListCatalogEntity.rs (line 11)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = SoftwareCatalogAPI::with_config(configuration);
10 let resp = api
11 .list_catalog_entity(ListCatalogEntityOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
Sourcepub fn list_catalog_entity_with_pagination(
&self,
params: ListCatalogEntityOptionalParams,
) -> impl Stream<Item = Result<EntityData, Error<ListCatalogEntityError>>> + '_
pub fn list_catalog_entity_with_pagination( &self, params: ListCatalogEntityOptionalParams, ) -> impl Stream<Item = Result<EntityData, Error<ListCatalogEntityError>>> + '_
Examples found in repository?
examples/v2_software-catalog_ListCatalogEntity_2305103326.rs (line 13)
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = SoftwareCatalogAPI::with_config(configuration);
12 let response =
13 api.list_catalog_entity_with_pagination(ListCatalogEntityOptionalParams::default());
14 pin_mut!(response);
15 while let Some(resp) = response.next().await {
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21 }
22}
Sourcepub async fn list_catalog_entity_with_http_info(
&self,
params: ListCatalogEntityOptionalParams,
) -> Result<ResponseContent<ListEntityCatalogResponse>, Error<ListCatalogEntityError>>
pub async fn list_catalog_entity_with_http_info( &self, params: ListCatalogEntityOptionalParams, ) -> Result<ResponseContent<ListEntityCatalogResponse>, Error<ListCatalogEntityError>>
Get a list of entities from Software Catalog.
Sourcepub async fn upsert_catalog_entity(
&self,
body: UpsertCatalogEntityRequest,
) -> Result<UpsertCatalogEntityResponse, Error<UpsertCatalogEntityError>>
pub async fn upsert_catalog_entity( &self, body: UpsertCatalogEntityRequest, ) -> Result<UpsertCatalogEntityResponse, Error<UpsertCatalogEntityError>>
Create or update entities in Software Catalog.
Examples found in repository?
examples/v2_software-catalog_UpsertCatalogEntity_586948155.rs (line 70)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("service-examplesoftwarecatalog".to_string())
31 .additional_owners(vec![])
32 .contacts(vec![EntityV3MetadataContactsItems::new(
33 "https://slack/".to_string(),
34 "slack".to_string(),
35 )])
36 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
37 .inherit_from("application:default/myapp".to_string())
38 .links(vec![EntityV3MetadataLinksItems::new(
39 "mylink".to_string(),
40 "link".to_string(),
41 "https://mylink".to_string(),
42 )])
43 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
44 )
45 .datadog(
46 EntityV3ServiceDatadog::new()
47 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
48 .events(vec![EntityV3DatadogEventItem::new()])
49 .logs(vec![EntityV3DatadogLogItem::new()])
50 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
51 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
52 )
53 .integrations(
54 EntityV3Integrations::new()
55 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
56 "https://www.opsgenie.com/service/shopping-cart".to_string(),
57 ))
58 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
59 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
60 )),
61 )
62 .spec(
63 EntityV3ServiceSpec::new()
64 .depends_on(vec![])
65 .languages(vec![]),
66 ),
67 ))));
68 let configuration = datadog::Configuration::new();
69 let api = SoftwareCatalogAPI::with_config(configuration);
70 let resp = api.upsert_catalog_entity(body).await;
71 if let Ok(value) = resp {
72 println!("{:#?}", value);
73 } else {
74 println!("{:#?}", resp.unwrap_err());
75 }
76}
More examples
examples/v2_software-catalog_UpsertCatalogEntity.rs (line 74)
25async fn main() {
26 let body = UpsertCatalogEntityRequest::EntityV3(Box::new(EntityV3::EntityV3Service(Box::new(
27 EntityV3Service::new(
28 EntityV3APIVersion::V3,
29 EntityV3ServiceKind::SERVICE,
30 EntityV3Metadata::new("myService".to_string())
31 .additional_owners(vec![EntityV3MetadataAdditionalOwnersItems::new(
32 "".to_string(),
33 )])
34 .contacts(vec![EntityV3MetadataContactsItems::new(
35 "https://slack/".to_string(),
36 "slack".to_string(),
37 )])
38 .id("4b163705-23c0-4573-b2fb-f6cea2163fcb".to_string())
39 .inherit_from("application:default/myapp".to_string())
40 .links(vec![EntityV3MetadataLinksItems::new(
41 "mylink".to_string(),
42 "link".to_string(),
43 "https://mylink".to_string(),
44 )])
45 .namespace("default".to_string())
46 .tags(vec!["this:tag".to_string(), "that:tag".to_string()]),
47 )
48 .datadog(
49 EntityV3ServiceDatadog::new()
50 .code_locations(vec![EntityV3DatadogCodeLocationItem::new().paths(vec![])])
51 .events(vec![EntityV3DatadogEventItem::new()])
52 .logs(vec![EntityV3DatadogLogItem::new()])
53 .performance_data(EntityV3DatadogPerformance::new().tags(vec![]))
54 .pipelines(EntityV3DatadogPipelines::new().fingerprints(vec![])),
55 )
56 .integrations(
57 EntityV3Integrations::new()
58 .opsgenie(EntityV3DatadogIntegrationOpsgenie::new(
59 "https://www.opsgenie.com/service/shopping-cart".to_string(),
60 ))
61 .pagerduty(EntityV3DatadogIntegrationPagerduty::new(
62 "https://www.pagerduty.com/service-directory/Pshopping-cart".to_string(),
63 )),
64 )
65 .spec(
66 EntityV3ServiceSpec::new()
67 .component_of(vec![])
68 .depends_on(vec![])
69 .languages(vec![]),
70 ),
71 ))));
72 let configuration = datadog::Configuration::new();
73 let api = SoftwareCatalogAPI::with_config(configuration);
74 let resp = api.upsert_catalog_entity(body).await;
75 if let Ok(value) = resp {
76 println!("{:#?}", value);
77 } else {
78 println!("{:#?}", resp.unwrap_err());
79 }
80}
Sourcepub async fn upsert_catalog_entity_with_http_info(
&self,
body: UpsertCatalogEntityRequest,
) -> Result<ResponseContent<UpsertCatalogEntityResponse>, Error<UpsertCatalogEntityError>>
pub async fn upsert_catalog_entity_with_http_info( &self, body: UpsertCatalogEntityRequest, ) -> Result<ResponseContent<UpsertCatalogEntityResponse>, Error<UpsertCatalogEntityError>>
Create or update entities in Software Catalog.
Trait Implementations§
Source§impl Clone for SoftwareCatalogAPI
impl Clone for SoftwareCatalogAPI
Source§fn clone(&self) -> SoftwareCatalogAPI
fn clone(&self) -> SoftwareCatalogAPI
Returns a copy 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 SoftwareCatalogAPI
impl Debug for SoftwareCatalogAPI
Auto Trait Implementations§
impl Freeze for SoftwareCatalogAPI
impl !RefUnwindSafe for SoftwareCatalogAPI
impl Send for SoftwareCatalogAPI
impl Sync for SoftwareCatalogAPI
impl Unpin for SoftwareCatalogAPI
impl !UnwindSafe for SoftwareCatalogAPI
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