v2_microsoft_teams_integration_CreateTenantBasedHandle/
v2_microsoft-teams-integration_CreateTenantBasedHandle.rs1use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_microsoft_teams_integration::MicrosoftTeamsIntegrationAPI;
4use datadog_api_client::datadogV2::model::MicrosoftTeamsCreateTenantBasedHandleRequest;
5use datadog_api_client::datadogV2::model::MicrosoftTeamsTenantBasedHandleRequestAttributes;
6use datadog_api_client::datadogV2::model::MicrosoftTeamsTenantBasedHandleRequestData;
7use datadog_api_client::datadogV2::model::MicrosoftTeamsTenantBasedHandleType;
8
9#[tokio::main]
10async fn main() {
11 let body = MicrosoftTeamsCreateTenantBasedHandleRequest::new(
12 MicrosoftTeamsTenantBasedHandleRequestData::new(
13 MicrosoftTeamsTenantBasedHandleRequestAttributes::new(
14 "fake-channel-id".to_string(),
15 "fake-handle-name".to_string(),
16 "00000000-0000-0000-0000-000000000000".to_string(),
17 "00000000-0000-0000-0000-000000000001".to_string(),
18 ),
19 MicrosoftTeamsTenantBasedHandleType::TENANT_BASED_HANDLE,
20 ),
21 );
22 let configuration = datadog::Configuration::new();
23 let api = MicrosoftTeamsIntegrationAPI::with_config(configuration);
24 let resp = api.create_tenant_based_handle(body).await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}