Check if an SLO can be safely deleted. For example,
assure an SLO can be deleted without disrupting a dashboard.
This endpoint requires the slos_read permission.
OAuth apps require the slos_read authorization scope to access this endpoint.
Arguments
Query Strings
Name
Type
Description
ids [required]
string
A comma separated list of the IDs of the service level objectives objects.
"""
Check if SLOs can be safely deleted returns "OK" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v1.api.service_level_objectives_apiimportServiceLevelObjectivesApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=ServiceLevelObjectivesApi(api_client)response=api_instance.check_can_delete_slo(ids="ids",)print(response)
# Check if SLOs can be safely deleted returns "OK" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V1::ServiceLevelObjectivesAPI.newpapi_instance.check_can_delete_slo("ids")
// Check if SLOs can be safely deleted 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/datadogV1")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV1.NewServiceLevelObjectivesApi(apiClient)resp,r,err:=api.CheckCanDeleteSLO(ctx,"ids")iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `ServiceLevelObjectivesApi.CheckCanDeleteSLO`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `ServiceLevelObjectivesApi.CheckCanDeleteSLO`:\n%s\n",responseContent)}
// Check if SLOs can be safely deleted returns "OK" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV1::api_service_level_objectives::ServiceLevelObjectivesAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=ServiceLevelObjectivesAPI::with_config(configuration);letresp=api.check_can_delete_slo("ids".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.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Check if SLOs can be safely deleted returns "OK" response
*/import{client,v1}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv1.ServiceLevelObjectivesApi(configuration);constparams: v1.ServiceLevelObjectivesApiCheckCanDeleteSLORequest={ids:"ids",};apiInstance.checkCanDeleteSLO(params).then((data: v1.CheckCanDeleteSLOResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));