# CfnWorkspaceProps

Properties for defining a `CfnWorkspace`.

Extends: CfnWorkspaceProps
Used as props by: CfnWorkspace

- Source: Generated code
- Type last changed: v2.199.0 · 27 May 2025

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_aps as aps } from 'aws-cdk-lib';
const cfnWorkspaceProps: aps.CfnWorkspaceProps = {
  alertManagerDefinition: 'alertManagerDefinition',
  alias: 'alias',
  kmsKeyArn: 'kmsKeyArn',
  loggingConfiguration: {
    logGroupArn: 'logGroupArn',
  },
  queryLoggingConfiguration: {
    destinations: [{
      cloudWatchLogs: {
        logGroupArn: 'logGroupArn',
      },
      filters: {
        qspThreshold: 123,
      },
    }],
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  workspaceConfiguration: {
    limitsPerLabelSets: [{
      labelSet: [{
        name: 'name',
        value: 'value',
      }],
      limits: {
        maxSeries: 123,
      },
    }],
    outOfOrderTimeWindowInSeconds: 123,
    retentionPeriodInDays: 123,
    ruleQueryOffsetInSeconds: 123,
  },
};
```

## Properties

- `alertManagerDefinition`: string — The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.

  For details about the alert manager definition, see [Creating an alert manager configuration files](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-alertmanager-config.html) in the *Amazon Managed Service for Prometheus User Guide* .

  The following example shows part of a CloudFormation YAML file with an embedded alert manager definition (following the `- |-` ).

  `Workspace: Type: AWS::APS::Workspace .... Properties: .... AlertManagerDefinition: Fn::Sub: - |- alertmanager_config: | templates: - 'default_template' route: receiver: example-sns receivers: - name: example-sns sns_configs: - topic_arn: 'arn:aws:sns:${AWS::Region}:${AWS::AccountId}:${TopicName}' -`

- `alias`: string — The alias that is assigned to this workspace to help identify it.

  It does not need to be unique.

- `kmsKeyArn`: string — (optional) The ARN for a customer managed AWS key to use for encrypting data within your workspace.

  For more information about using your own key in your workspace, see [Encryption at rest](https://docs.aws.amazon.com/prometheus/latest/userguide/encryption-at-rest-Amazon-Service-Prometheus.html) in the *Amazon Managed Service for Prometheus User Guide* .

- `loggingConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWorkspace.LoggingConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnWorkspace.LoggingConfigurationProperty.html) — Contains information about the logging configuration for the workspace.

- `queryLoggingConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWorkspace.QueryLoggingConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnWorkspace.QueryLoggingConfigurationProperty.html) — The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — The list of tag keys and values that are associated with the workspace.

- `workspaceConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnWorkspace.WorkspaceConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnWorkspace.WorkspaceConfigurationProperty.html) — Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.
