Skip to content

Use this operation to create or update the label sets, label set limits, and retention period of a workspace

Description

Use this operation to create or update the label sets, label set limits, and retention period of a workspace.

You must specify at least one of limitsPerLabelSet or retentionPeriodInDays for the request to be valid.

Usage

prometheusservice_update_workspace_configuration(workspaceId,
  clientToken, limitsPerLabelSet, retentionPeriodInDays,
  outOfOrderTimeWindowInSeconds, ruleQueryOffsetInSeconds)

Arguments

  • workspaceId

    [required] The ID of the workspace that you want to update. To find the IDs of your workspaces, use the list_workspaces operation.

  • clientToken

    You can include a token in your operation to make it an idempotent opeartion.

  • limitsPerLabelSet

    This is an array of structures, where each structure defines a label set for the workspace, and defines the active time series limit for each of those label sets. Each label name in a label set must be unique.

  • retentionPeriodInDays

    Specifies how many days that metrics will be retained in the workspace.

  • outOfOrderTimeWindowInSeconds

    Specifies the time window in seconds for accepting out of order samples. Out of order samples older than this window are rejected.

  • ruleQueryOffsetInSeconds

    Specifies the duration in seconds to offset rule evaluation queries into the past. This allows ingested samples to be available before rule evaluation.

Value

A list with the following syntax:

list(
  status = list(
    statusCode = "ACTIVE"|"UPDATING"|"UPDATE_FAILED",
    statusReason = "string"
  )
)

Request syntax

svc$update_workspace_configuration(
  workspaceId = "string",
  clientToken = "string",
  limitsPerLabelSet = list(
    list(
      limits = list(
        maxSeries = 123
      ),
      labelSet = list(
        "string"
      )
    )
  ),
  retentionPeriodInDays = 123,
  outOfOrderTimeWindowInSeconds = 123,
  ruleQueryOffsetInSeconds = 123
)