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