Skip to content

Latest commit

 

History

History
642 lines (422 loc) · 18.9 KB

MetricExportApi.md

File metadata and controls

642 lines (422 loc) · 18.9 KB

MetricExport

All URIs are relative to https://cockroachlabs.cloud

Method HTTP request Description
DeleteCloudWatchMetricExport Delete /api/v1/clusters/{cluster_id}/metricexport/cloudwatch Delete the CloudWatch Metric Export configuration for a cluster
DeleteDatadogMetricExport Delete /api/v1/clusters/{cluster_id}/metricexport/datadog Delete the Datadog Metric Export configuration for a cluster
DeletePrometheusMetricExport Delete /api/v1/clusters/{cluster_id}/metricexport/prometheus Disable Prometheus Metric Export for a cluster
EnableCloudWatchMetricExport Post /api/v1/clusters/{cluster_id}/metricexport/cloudwatch Create or update the CloudWatch Metric Export configuration for a cluster
EnableDatadogMetricExport Post /api/v1/clusters/{cluster_id}/metricexport/datadog Create or update the Datadog Metric Export configuration for a cluster
EnablePrometheusMetricExport Post /api/v1/clusters/{cluster_id}/metricexport/prometheus Enable Prometheus Metric Export for a cluster
GetCloudWatchMetricExportInfo Get /api/v1/clusters/{cluster_id}/metricexport/cloudwatch Get the CloudWatch Metric Export configuration for a cluster
GetDatadogMetricExportInfo Get /api/v1/clusters/{cluster_id}/metricexport/datadog Get the Datadog Metric Export configuration for a cluster
GetPrometheusMetricExportInfo Get /api/v1/clusters/{cluster_id}/metricexport/prometheus Get the Prometheus Metric Export configuration for a cluster

DeleteCloudWatchMetricExport

DeleteMetricExportResponse DeleteCloudWatchMetricExport(ctx, clusterId).Execute()

Delete the CloudWatch Metric Export configuration for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.DeleteCloudWatchMetricExport(context.Background(), clusterId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.DeleteCloudWatchMetricExport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteCloudWatchMetricExport`: DeleteMetricExportResponse
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.DeleteCloudWatchMetricExport`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

Return type

DeleteMetricExportResponse

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

DeleteDatadogMetricExport

DeleteMetricExportResponse DeleteDatadogMetricExport(ctx, clusterId).Execute()

Delete the Datadog Metric Export configuration for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.DeleteDatadogMetricExport(context.Background(), clusterId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.DeleteDatadogMetricExport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeleteDatadogMetricExport`: DeleteMetricExportResponse
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.DeleteDatadogMetricExport`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

Return type

DeleteMetricExportResponse

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

DeletePrometheusMetricExport

DeleteMetricExportResponse DeletePrometheusMetricExport(ctx, clusterId).Execute()

Disable Prometheus Metric Export for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.DeletePrometheusMetricExport(context.Background(), clusterId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.DeletePrometheusMetricExport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `DeletePrometheusMetricExport`: DeleteMetricExportResponse
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.DeletePrometheusMetricExport`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

Return type

DeleteMetricExportResponse

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

EnableCloudWatchMetricExport

CloudWatchMetricExportInfo EnableCloudWatchMetricExport(ctx, clusterId).EnableCloudWatchMetricExportRequest(enableCloudWatchMetricExportRequest).Execute()

Create or update the CloudWatch Metric Export configuration for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 
    enableCloudWatchMetricExportRequest := *openapiclient.NewEnableCloudWatchMetricExportRequest("RoleArn_example") // EnableCloudWatchMetricExportRequest | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.EnableCloudWatchMetricExport(context.Background(), clusterId).EnableCloudWatchMetricExportRequest(enableCloudWatchMetricExportRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.EnableCloudWatchMetricExport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `EnableCloudWatchMetricExport`: CloudWatchMetricExportInfo
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.EnableCloudWatchMetricExport`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

enableCloudWatchMetricExportRequest | EnableCloudWatchMetricExportRequest | |

Return type

CloudWatchMetricExportInfo

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

EnableDatadogMetricExport

DatadogMetricExportInfo EnableDatadogMetricExport(ctx, clusterId).EnableDatadogMetricExportRequest(enableDatadogMetricExportRequest).Execute()

Create or update the Datadog Metric Export configuration for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 
    enableDatadogMetricExportRequest := *openapiclient.NewEnableDatadogMetricExportRequest("ApiKey_example", openapiclient.DatadogSite.Type("US1")) // EnableDatadogMetricExportRequest | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.EnableDatadogMetricExport(context.Background(), clusterId).EnableDatadogMetricExportRequest(enableDatadogMetricExportRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.EnableDatadogMetricExport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `EnableDatadogMetricExport`: DatadogMetricExportInfo
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.EnableDatadogMetricExport`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

enableDatadogMetricExportRequest | EnableDatadogMetricExportRequest | |

Return type

DatadogMetricExportInfo

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

EnablePrometheusMetricExport

PrometheusMetricExportInfo EnablePrometheusMetricExport(ctx, clusterId).Execute()

Enable Prometheus Metric Export for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.EnablePrometheusMetricExport(context.Background(), clusterId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.EnablePrometheusMetricExport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `EnablePrometheusMetricExport`: PrometheusMetricExportInfo
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.EnablePrometheusMetricExport`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

Return type

PrometheusMetricExportInfo

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

GetCloudWatchMetricExportInfo

CloudWatchMetricExportInfo GetCloudWatchMetricExportInfo(ctx, clusterId).Execute()

Get the CloudWatch Metric Export configuration for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.GetCloudWatchMetricExportInfo(context.Background(), clusterId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.GetCloudWatchMetricExportInfo``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetCloudWatchMetricExportInfo`: CloudWatchMetricExportInfo
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.GetCloudWatchMetricExportInfo`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

Return type

CloudWatchMetricExportInfo

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

GetDatadogMetricExportInfo

DatadogMetricExportInfo GetDatadogMetricExportInfo(ctx, clusterId).Execute()

Get the Datadog Metric Export configuration for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.GetDatadogMetricExportInfo(context.Background(), clusterId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.GetDatadogMetricExportInfo``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetDatadogMetricExportInfo`: DatadogMetricExportInfo
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.GetDatadogMetricExportInfo`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

Return type

DatadogMetricExportInfo

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]

GetPrometheusMetricExportInfo

PrometheusMetricExportInfo GetPrometheusMetricExportInfo(ctx, clusterId).Execute()

Get the Prometheus Metric Export configuration for a cluster

Can be used by the following roles assigned at the organization, folder or cluster scope:

  • CLUSTER_ADMIN
  • CLUSTER_OPERATOR_WRITER

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    clusterId := "clusterId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewClient(configuration)
    resp, r, err := api_client.MetricExportApi.GetPrometheusMetricExportInfo(context.Background(), clusterId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `MetricExportApi.GetPrometheusMetricExportInfo``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetPrometheusMetricExportInfo`: PrometheusMetricExportInfo
    fmt.Fprintf(os.Stdout, "Response from `MetricExportApi.GetPrometheusMetricExportInfo`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
clusterId string

Other Parameters

Name Type Description Notes

Return type

PrometheusMetricExportInfo

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to README]