Retrieve the notification settings for the governance control with the given detection type,
including, for each supported event type, whether notifications are enabled and which
destinations receive them.
This endpoint requires the governance_console_read permission.
Arguments
Path Parameters
Name
Type
Description
detection_type [required]
string
The detection type that identifies the control; for example, unused_api_keys.
"""
Get control notification settings returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.governance_console_apiimportGovernanceConsoleApiconfiguration=Configuration()configuration.unstable_operations["get_governance_control_notification_settings"]=TruewithApiClient(configuration)asapi_client:api_instance=GovernanceConsoleApi(api_client)response=api_instance.get_governance_control_notification_settings(detection_type="detection_type",)print(response)
# Get control notification settings returns "OK" responserequire"datadog_api_client"DatadogAPIClient.configuredo|config|config.unstable_operations["v2.get_governance_control_notification_settings".to_sym]=trueendapi_instance=DatadogAPIClient::V2::GovernanceConsoleAPI.newpapi_instance.get_governance_control_notification_settings("detection_type")
// Get control notification settings returns "OK" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()configuration.SetUnstableOperationEnabled("v2.GetGovernanceControlNotificationSettings",true)apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewGovernanceConsoleApi(apiClient)resp,r,err:=api.GetGovernanceControlNotificationSettings(ctx,"detection_type")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `GovernanceConsoleApi.GetGovernanceControlNotificationSettings`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `GovernanceConsoleApi.GetGovernanceControlNotificationSettings`:\n%s\n",responseContent)}
// Get control notification settings returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_governance_console::GovernanceConsoleAPI;#[tokio::main]asyncfnmain(){letmutconfiguration=datadog::Configuration::new();configuration.set_unstable_operation_enabled("v2.GetGovernanceControlNotificationSettings",true);letapi=GovernanceConsoleAPI::with_config(configuration);letresp=api.get_governance_control_notification_settings("detection_type".to_string()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get control notification settings returns "OK" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();configuration.unstableOperations["v2.getGovernanceControlNotificationSettings"]=true;constapiInstance=newv2.GovernanceConsoleApi(configuration);constparams: v2.GovernanceConsoleApiGetGovernanceControlNotificationSettingsRequest={detectionType:"detection_type",};apiInstance.getGovernanceControlNotificationSettings(params).then((data: v2.ControlNotificationSettingsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));