PrometheusService / Client / update_workspace_configuration

update_workspace_configuration

PrometheusService.Client.update_workspace_configuration(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.update_workspace_configuration(
    clientToken='string',
    limitsPerLabelSet=[
        {
            'labelSet': {
                'string': 'string'
            },
            'limits': {
                'maxSeries': 123
            }
        },
    ],
    retentionPeriodInDays=123,
    workspaceId='string'
)
Parameters:
  • clientToken (string) –

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

    This field is autopopulated if not provided.

  • limitsPerLabelSet (list) –

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

    • (dict) –

      This structure defines one label set used to enforce ingestion limits for the workspace, and defines the limit for that label set.

      A label set is a unique combination of label-value pairs. Use them to control time series ingestion limits and to monitor usage by specific label groups. Example label sets might be team:finance or env:prod

      • labelSet (dict) – [REQUIRED]

        This defines one label set that will have an enforced ingestion limit.

        Label values accept ASCII characters and must contain at least one character that isn’t whitespace. ASCII control characters are not accepted. If the label name is metric name label __name__, then the metric part of the name must conform to the following pattern: [a-zA-Z_:][a-zA-Z0-9_:]*

        • (string) –

          • (string) –

      • limits (dict) – [REQUIRED]

        This structure contains the information about the limits that apply to time series that match this label set.

        • maxSeries (integer) –

          The maximum number of active series that can be ingested that match this label set.

          Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed Service for Prometheus to vend label set metrics to CloudWatch

  • retentionPeriodInDays (integer) – Specifies how many days that metrics will be retained in the workspace.

  • workspaceId (string) –

    [REQUIRED]

    The ID of the workspace that you want to update. To find the IDs of your workspaces, use the ListWorkspaces operation.

Return type:

dict

Returns:

Response Syntax

{
    'status': {
        'statusCode': 'ACTIVE'|'UPDATING'|'UPDATE_FAILED',
        'statusReason': 'string'
    }
}

Response Structure

  • (dict) –

    • status (dict) –

      The status of the workspace configuration.

      • statusCode (string) –

        The current status of the workspace configuration.

      • statusReason (string) –

        The reason for the current status, if a reason is available.

Exceptions