pub struct OnCallPagingAPI { /* private fields */ }
Expand description
Trigger and manage Datadog On-Call pages directly through the Datadog API.
Implementations§
Source§impl OnCallPagingAPI
impl OnCallPagingAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
examples/v2_on-call-paging_ResolveOnCallPage.rs (line 9)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = OnCallPagingAPI::with_config(configuration);
10 let resp = api
11 .resolve_on_call_page(
12 Uuid::parse_str("15e74b8b-f865-48d0-bcc5-453323ed2c8f").expect("invalid UUID"),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
More examples
examples/v2_on-call-paging_EscalateOnCallPage.rs (line 9)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = OnCallPagingAPI::with_config(configuration);
10 let resp = api
11 .escalate_on_call_page(
12 Uuid::parse_str("15e74b8b-f865-48d0-bcc5-453323ed2c8f").expect("invalid UUID"),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
examples/v2_on-call-paging_AcknowledgeOnCallPage.rs (line 9)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = OnCallPagingAPI::with_config(configuration);
10 let resp = api
11 .acknowledge_on_call_page(
12 Uuid::parse_str("15e74b8b-f865-48d0-bcc5-453323ed2c8f").expect("invalid UUID"),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
examples/v2_on-call-paging_CreateOnCallPage.rs (line 28)
13async fn main() {
14 let body = CreatePageRequest::new().data(
15 CreatePageRequestData::new(CreatePageRequestDataType::PAGES).attributes(
16 CreatePageRequestDataAttributes::new(
17 CreatePageRequestDataAttributesTarget::new()
18 .identifier("my-team".to_string())
19 .type_(OnCallPageTargetType::TEAM_HANDLE),
20 "Page title".to_string(),
21 PageUrgency::LOW,
22 )
23 .description("Page details.".to_string())
24 .tags(vec!["service:test".to_string()]),
25 ),
26 );
27 let configuration = datadog::Configuration::new();
28 let api = OnCallPagingAPI::with_config(configuration);
29 let resp = api.create_on_call_page(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn acknowledge_on_call_page(
&self,
page_id: Uuid,
) -> Result<(), Error<AcknowledgeOnCallPageError>>
pub async fn acknowledge_on_call_page( &self, page_id: Uuid, ) -> Result<(), Error<AcknowledgeOnCallPageError>>
Acknowledges an On-Call Page.
Examples found in repository?
examples/v2_on-call-paging_AcknowledgeOnCallPage.rs (lines 11-13)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = OnCallPagingAPI::with_config(configuration);
10 let resp = api
11 .acknowledge_on_call_page(
12 Uuid::parse_str("15e74b8b-f865-48d0-bcc5-453323ed2c8f").expect("invalid UUID"),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Sourcepub async fn acknowledge_on_call_page_with_http_info(
&self,
page_id: Uuid,
) -> Result<ResponseContent<()>, Error<AcknowledgeOnCallPageError>>
pub async fn acknowledge_on_call_page_with_http_info( &self, page_id: Uuid, ) -> Result<ResponseContent<()>, Error<AcknowledgeOnCallPageError>>
Acknowledges an On-Call Page.
Sourcepub async fn create_on_call_page(
&self,
body: CreatePageRequest,
) -> Result<CreatePageResponse, Error<CreateOnCallPageError>>
pub async fn create_on_call_page( &self, body: CreatePageRequest, ) -> Result<CreatePageResponse, Error<CreateOnCallPageError>>
Trigger a new On-Call Page.
Examples found in repository?
examples/v2_on-call-paging_CreateOnCallPage.rs (line 29)
13async fn main() {
14 let body = CreatePageRequest::new().data(
15 CreatePageRequestData::new(CreatePageRequestDataType::PAGES).attributes(
16 CreatePageRequestDataAttributes::new(
17 CreatePageRequestDataAttributesTarget::new()
18 .identifier("my-team".to_string())
19 .type_(OnCallPageTargetType::TEAM_HANDLE),
20 "Page title".to_string(),
21 PageUrgency::LOW,
22 )
23 .description("Page details.".to_string())
24 .tags(vec!["service:test".to_string()]),
25 ),
26 );
27 let configuration = datadog::Configuration::new();
28 let api = OnCallPagingAPI::with_config(configuration);
29 let resp = api.create_on_call_page(body).await;
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35}
Sourcepub async fn create_on_call_page_with_http_info(
&self,
body: CreatePageRequest,
) -> Result<ResponseContent<CreatePageResponse>, Error<CreateOnCallPageError>>
pub async fn create_on_call_page_with_http_info( &self, body: CreatePageRequest, ) -> Result<ResponseContent<CreatePageResponse>, Error<CreateOnCallPageError>>
Trigger a new On-Call Page.
Sourcepub async fn escalate_on_call_page(
&self,
page_id: Uuid,
) -> Result<(), Error<EscalateOnCallPageError>>
pub async fn escalate_on_call_page( &self, page_id: Uuid, ) -> Result<(), Error<EscalateOnCallPageError>>
Escalates an On-Call Page.
Examples found in repository?
examples/v2_on-call-paging_EscalateOnCallPage.rs (lines 11-13)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = OnCallPagingAPI::with_config(configuration);
10 let resp = api
11 .escalate_on_call_page(
12 Uuid::parse_str("15e74b8b-f865-48d0-bcc5-453323ed2c8f").expect("invalid UUID"),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Sourcepub async fn escalate_on_call_page_with_http_info(
&self,
page_id: Uuid,
) -> Result<ResponseContent<()>, Error<EscalateOnCallPageError>>
pub async fn escalate_on_call_page_with_http_info( &self, page_id: Uuid, ) -> Result<ResponseContent<()>, Error<EscalateOnCallPageError>>
Escalates an On-Call Page.
Sourcepub async fn resolve_on_call_page(
&self,
page_id: Uuid,
) -> Result<(), Error<ResolveOnCallPageError>>
pub async fn resolve_on_call_page( &self, page_id: Uuid, ) -> Result<(), Error<ResolveOnCallPageError>>
Resolves an On-Call Page.
Examples found in repository?
examples/v2_on-call-paging_ResolveOnCallPage.rs (lines 11-13)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = OnCallPagingAPI::with_config(configuration);
10 let resp = api
11 .resolve_on_call_page(
12 Uuid::parse_str("15e74b8b-f865-48d0-bcc5-453323ed2c8f").expect("invalid UUID"),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Sourcepub async fn resolve_on_call_page_with_http_info(
&self,
page_id: Uuid,
) -> Result<ResponseContent<()>, Error<ResolveOnCallPageError>>
pub async fn resolve_on_call_page_with_http_info( &self, page_id: Uuid, ) -> Result<ResponseContent<()>, Error<ResolveOnCallPageError>>
Resolves an On-Call Page.
Trait Implementations§
Source§impl Clone for OnCallPagingAPI
impl Clone for OnCallPagingAPI
Source§fn clone(&self) -> OnCallPagingAPI
fn clone(&self) -> OnCallPagingAPI
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OnCallPagingAPI
impl Debug for OnCallPagingAPI
Auto Trait Implementations§
impl Freeze for OnCallPagingAPI
impl !RefUnwindSafe for OnCallPagingAPI
impl Send for OnCallPagingAPI
impl Sync for OnCallPagingAPI
impl Unpin for OnCallPagingAPI
impl !UnwindSafe for OnCallPagingAPI
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