All URIs are relative to https://api.datadoghq.com
Method | HTTP request | Description |
---|---|---|
CreateSLOCorrection | Post /api/v1/slo/correction | Create an SLO correction |
DeleteSLOCorrection | Delete /api/v1/slo/correction/{slo_correction_id} | Delete an SLO correction |
GetSLOCorrection | Get /api/v1/slo/correction/{slo_correction_id} | Get an SLO correction for an SLO |
ListSLOCorrection | Get /api/v1/slo/correction | Get all SLO corrections |
UpdateSLOCorrection | Patch /api/v1/slo/correction/{slo_correction_id} | Update an SLO correction |
SLOCorrectionResponse CreateSLOCorrection(ctx, body)
Create an SLO Correction
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
body := *datadog.NewSLOCorrectionCreateRequest() // SLOCorrectionCreateRequest | Create an SLO Correction
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("CreateSLOCorrection", true)
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.ServiceLevelObjectiveCorrectionsApi.CreateSLOCorrection(ctx, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServiceLevelObjectiveCorrectionsApi.CreateSLOCorrection`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSLOCorrection`: SLOCorrectionResponse
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from ServiceLevelObjectiveCorrectionsApi.CreateSLOCorrection:\n%s\n", responseContent)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | Context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | SLOCorrectionCreateRequest | Create an SLO Correction |
This endpoint does not have optional parameters.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSLOCorrection(ctx, sloCorrectionId)
Permanently delete the specified SLO correction object
package main
import (
"context"
"fmt"
"os"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
sloCorrectionId := "sloCorrectionId_example" // string | The ID of the SLO correction object
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("DeleteSLOCorrection", true)
apiClient := datadog.NewAPIClient(configuration)
r, err := apiClient.ServiceLevelObjectiveCorrectionsApi.DeleteSLOCorrection(ctx, sloCorrectionId)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServiceLevelObjectiveCorrectionsApi.DeleteSLOCorrection`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | Context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sloCorrectionId | string | The ID of the SLO correction object |
This endpoint does not have optional parameters.
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SLOCorrectionResponse GetSLOCorrection(ctx, sloCorrectionId)
Get an SLO correction
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
sloCorrectionId := "sloCorrectionId_example" // string | The ID of the SLO correction object
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("GetSLOCorrection", true)
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.ServiceLevelObjectiveCorrectionsApi.GetSLOCorrection(ctx, sloCorrectionId)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServiceLevelObjectiveCorrectionsApi.GetSLOCorrection`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSLOCorrection`: SLOCorrectionResponse
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from ServiceLevelObjectiveCorrectionsApi.GetSLOCorrection:\n%s\n", responseContent)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | Context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sloCorrectionId | string | The ID of the SLO correction object |
This endpoint does not have optional parameters.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SLOCorrectionListResponse ListSLOCorrection(ctx)
Get all Service Level Objective corrections
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("ListSLOCorrection", true)
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.ServiceLevelObjectiveCorrectionsApi.ListSLOCorrection(ctx)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServiceLevelObjectiveCorrectionsApi.ListSLOCorrection`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListSLOCorrection`: SLOCorrectionListResponse
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from ServiceLevelObjectiveCorrectionsApi.ListSLOCorrection:\n%s\n", responseContent)
}
This endpoint does not need any parameter.
This endpoint does not have optional parameters.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SLOCorrectionResponse UpdateSLOCorrection(ctx, sloCorrectionId, body)
Update the specified SLO correction object object
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
sloCorrectionId := "sloCorrectionId_example" // string | The ID of the SLO correction object
body := *datadog.NewSLOCorrectionUpdateRequest() // SLOCorrectionUpdateRequest | The edited SLO correction object.
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("UpdateSLOCorrection", true)
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.ServiceLevelObjectiveCorrectionsApi.UpdateSLOCorrection(ctx, sloCorrectionId, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServiceLevelObjectiveCorrectionsApi.UpdateSLOCorrection`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSLOCorrection`: SLOCorrectionResponse
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from ServiceLevelObjectiveCorrectionsApi.UpdateSLOCorrection:\n%s\n", responseContent)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | Context for authentication, logging, cancellation, deadlines, tracing, etc. | |
sloCorrectionId | string | The ID of the SLO correction object | |
body | SLOCorrectionUpdateRequest | The edited SLO correction object. |
This endpoint does not have optional parameters.
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]