All URIs are relative to https://api.datadoghq.com
Method | HTTP request | Description |
---|---|---|
CreateGCPIntegration | Post /api/v1/integration/gcp | Create a GCP integration |
DeleteGCPIntegration | Delete /api/v1/integration/gcp | Delete a GCP integration |
ListGCPIntegration | Get /api/v1/integration/gcp | List all GCP integrations |
UpdateGCPIntegration | Put /api/v1/integration/gcp | Update a GCP integration |
map[string]interface{} CreateGCPIntegration(ctx, body)
Create a Datadog-GCP integration.
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog ""
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
body := *datadog.NewGCPAccount() // GCPAccount | Create a Datadog-GCP integration.
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.GCPIntegrationApi.CreateGCPIntegration(ctx, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GCPIntegrationApi.CreateGCPIntegration`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateGCPIntegration`: map[string]interface{}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from GCPIntegrationApi.CreateGCPIntegration:\n%s\n", responseContent)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | Context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | GCPAccount | Create a Datadog-GCP integration. |
This endpoint does not have optional parameters.
map[string]interface{}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} DeleteGCPIntegration(ctx, body)
Delete a given Datadog-GCP integration.
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog ""
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
body := *datadog.NewGCPAccount() // GCPAccount | Delete a given Datadog-GCP integration.
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.GCPIntegrationApi.DeleteGCPIntegration(ctx, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GCPIntegrationApi.DeleteGCPIntegration`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteGCPIntegration`: map[string]interface{}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from GCPIntegrationApi.DeleteGCPIntegration:\n%s\n", responseContent)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | Context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | GCPAccount | Delete a given Datadog-GCP integration. |
This endpoint does not have optional parameters.
map[string]interface{}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]GCPAccount ListGCPIntegration(ctx)
List all Datadog-GCP integrations configured in your Datadog account.
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog ""
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.GCPIntegrationApi.ListGCPIntegration(ctx)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GCPIntegrationApi.ListGCPIntegration`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListGCPIntegration`: []GCPAccount
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from GCPIntegrationApi.ListGCPIntegration:\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]
map[string]interface{} UpdateGCPIntegration(ctx, body)
Update a Datadog-GCP integrations host_filters and/or auto-mute.
Requires a project_id
and client_email
, however these fields cannot be updated.
If you need to update these fields, delete and use the create (POST
) endpoint.
The unspecified fields will keep their original values.
package main
import (
"context"
"encoding/json"
"fmt"
"os"
datadog ""
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
body := *datadog.NewGCPAccount() // GCPAccount | Update a Datadog-GCP integration.
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
resp, r, err := apiClient.GCPIntegrationApi.UpdateGCPIntegration(ctx, body)
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GCPIntegrationApi.UpdateGCPIntegration`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateGCPIntegration`: map[string]interface{}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from GCPIntegrationApi.UpdateGCPIntegration:\n%s\n", responseContent)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | Context for authentication, logging, cancellation, deadlines, tracing, etc. | |
body | GCPAccount | Update a Datadog-GCP integration. |
This endpoint does not have optional parameters.
map[string]interface{}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]