Skip to content
v2.274.0

CfnWorkspaceProps Struct ​

Properties for defining a CfnWorkspace.

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 ​

alertManagerDefinitionoptionalstringalert_manager_definitionoptionalstralertManagerDefinitionoptionalStringAlertManagerDefinitionoptionalstringAlertManagerDefinitionoptional*string#
The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
notes

For details about the alert manager definition, see Creating an alert manager configuration files 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}' -

aliasoptionalstringaliasoptionalstraliasoptionalStringAliasoptionalstringAliasoptional*string#
The alias that is assigned to this workspace to help identify it.

It does not need to be unique.

kmsKeyArnoptionalstringkms_key_arnoptionalstrkmsKeyArnoptionalStringKmsKeyArnoptionalstringKmsKeyArnoptional*string#
(optional) The ARN for a customer managed AWS key to use for encrypting data within your workspace.
notes

For more information about using your own key in your workspace, see Encryption at rest in the Amazon Managed Service for Prometheus User Guide .

loggingConfigurationoptionalIResolvable | CfnWorkspace.LoggingConfigurationPropertylogging_configurationoptionaltyping.Union[IResolvable, LoggingConfigurationProperty]loggingConfigurationoptionalIResolvableLoggingConfigurationoptionalIResolvableLoggingConfigurationoptionalinterface{}#
Contains information about the logging configuration for the workspace.
queryLoggingConfigurationoptionalIResolvable | CfnWorkspace.QueryLoggingConfigurationPropertyquery_logging_configurationoptionaltyping.Union[IResolvable, QueryLoggingConfigurationProperty]queryLoggingConfigurationoptionalIResolvableQueryLoggingConfigurationoptionalIResolvableQueryLoggingConfigurationoptionalinterface{}#
The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#
The list of tag keys and values that are associated with the workspace.
workspaceConfigurationoptionalIResolvable | CfnWorkspace.WorkspaceConfigurationPropertyworkspace_configurationoptionaltyping.Union[IResolvable, WorkspaceConfigurationProperty]workspaceConfigurationoptionalIResolvableWorkspaceConfigurationoptionalIResolvableWorkspaceConfigurationoptionalinterface{}#
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.