CfnWorkspacePropsMixin

class aws_cdk.mixins_preview.aws_aps.mixins.CfnWorkspacePropsMixin(props, *, strategy=None)

Bases: Mixin

An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html

CloudformationResource:

AWS::APS::Workspace

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

cfn_workspace_props_mixin = aps_mixins.CfnWorkspacePropsMixin(aps_mixins.CfnWorkspaceMixinProps(
    alert_manager_definition="alertManagerDefinition",
    alias="alias",
    kms_key_arn="kmsKeyArn",
    logging_configuration=aps_mixins.CfnWorkspacePropsMixin.LoggingConfigurationProperty(
        log_group_arn="logGroupArn"
    ),
    query_logging_configuration=aps_mixins.CfnWorkspacePropsMixin.QueryLoggingConfigurationProperty(
        destinations=[aps_mixins.CfnWorkspacePropsMixin.LoggingDestinationProperty(
            cloud_watch_logs=aps_mixins.CfnWorkspacePropsMixin.CloudWatchLogDestinationProperty(
                log_group_arn="logGroupArn"
            ),
            filters=aps_mixins.CfnWorkspacePropsMixin.LoggingFilterProperty(
                qsp_threshold=123
            )
        )]
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    workspace_configuration=aps_mixins.CfnWorkspacePropsMixin.WorkspaceConfigurationProperty(
        limits_per_label_sets=[aps_mixins.CfnWorkspacePropsMixin.LimitsPerLabelSetProperty(
            label_set=[aps_mixins.CfnWorkspacePropsMixin.LabelProperty(
                name="name",
                value="value"
            )],
            limits=aps_mixins.CfnWorkspacePropsMixin.LimitsPerLabelSetEntryProperty(
                max_series=123
            )
        )],
        retention_period_in_days=123
    )
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::APS::Workspace.

Parameters:
  • props (Union[CfnWorkspaceMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['alertManagerDefinition', 'alias', 'kmsKeyArn', 'loggingConfiguration', 'queryLoggingConfiguration', 'tags', 'workspaceConfiguration']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

CloudWatchLogDestinationProperty

class CfnWorkspacePropsMixin.CloudWatchLogDestinationProperty(*, log_group_arn=None)

Bases: object

Configuration details for logging to CloudWatch Logs.

Parameters:

log_group_arn (Optional[str]) – The ARN of the CloudWatch log group.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-cloudwatchlogdestination.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

cloud_watch_log_destination_property = aps_mixins.CfnWorkspacePropsMixin.CloudWatchLogDestinationProperty(
    log_group_arn="logGroupArn"
)

Attributes

log_group_arn

The ARN of the CloudWatch log group.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-cloudwatchlogdestination.html#cfn-aps-workspace-cloudwatchlogdestination-loggrouparn

LabelProperty

class CfnWorkspacePropsMixin.LabelProperty(*, name=None, value=None)

Bases: object

A label is a name:value pair used to add context to ingested metrics.

This structure defines the name and value for one label that is used in a label set. You can set ingestion limits on time series that match defined label sets, to help prevent a workspace from being overwhelmed with unexpected spikes in time series ingestion.

Parameters:
  • name (Optional[str]) – The name for this label.

  • value (Optional[str]) – The value for this label.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-label.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

label_property = aps_mixins.CfnWorkspacePropsMixin.LabelProperty(
    name="name",
    value="value"
)

Attributes

name

The name for this label.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-label.html#cfn-aps-workspace-label-name

value

The value for this label.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-label.html#cfn-aps-workspace-label-value

LimitsPerLabelSetEntryProperty

class CfnWorkspacePropsMixin.LimitsPerLabelSetEntryProperty(*, max_series=None)

Bases: object

This structure contains the limits that apply to time series that match one label set.

Parameters:

max_series (Union[int, float, None]) – 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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelsetentry.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

limits_per_label_set_entry_property = aps_mixins.CfnWorkspacePropsMixin.LimitsPerLabelSetEntryProperty(
    max_series=123
)

Attributes

max_series

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelsetentry.html#cfn-aps-workspace-limitsperlabelsetentry-maxseries

LimitsPerLabelSetProperty

class CfnWorkspacePropsMixin.LimitsPerLabelSetProperty(*, label_set=None, limits=None)

Bases: object

This defines a label set for the workspace, and defines the ingestion limit for active time series that match that label set.

Each label name in a label set must be unique.

Parameters:
  • label_set (Union[IResolvable, Sequence[Union[IResolvable, LabelProperty, Dict[str, Any]]], None]) – This defines one label set that will have an enforced ingestion limit. You can set ingestion limits on time series that match defined label sets, to help prevent a workspace from being overwhelmed with unexpected spikes in time series ingestion. Label values accept all UTF-8 characters with one exception. 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_:]*

  • limits (Union[IResolvable, LimitsPerLabelSetEntryProperty, Dict[str, Any], None]) – This structure contains the information about the limits that apply to time series that match this label set.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelset.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

limits_per_label_set_property = aps_mixins.CfnWorkspacePropsMixin.LimitsPerLabelSetProperty(
    label_set=[aps_mixins.CfnWorkspacePropsMixin.LabelProperty(
        name="name",
        value="value"
    )],
    limits=aps_mixins.CfnWorkspacePropsMixin.LimitsPerLabelSetEntryProperty(
        max_series=123
    )
)

Attributes

label_set

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

You can set ingestion limits on time series that match defined label sets, to help prevent a workspace from being overwhelmed with unexpected spikes in time series ingestion.

Label values accept all UTF-8 characters with one exception. 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_:]*

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelset.html#cfn-aps-workspace-limitsperlabelset-labelset

limits

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelset.html#cfn-aps-workspace-limitsperlabelset-limits

LoggingConfigurationProperty

class CfnWorkspacePropsMixin.LoggingConfigurationProperty(*, log_group_arn=None)

Bases: object

Contains information about the rules and alerting logging configuration for the workspace.

These logging configurations are only for rules and alerting logs.

Parameters:

log_group_arn (Optional[str]) – The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

logging_configuration_property = aps_mixins.CfnWorkspacePropsMixin.LoggingConfigurationProperty(
    log_group_arn="logGroupArn"
)

Attributes

log_group_arn

The ARN of the CloudWatch log group to which the vended log data will be published.

This log group must exist prior to calling this operation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html#cfn-aps-workspace-loggingconfiguration-loggrouparn

LoggingDestinationProperty

class CfnWorkspacePropsMixin.LoggingDestinationProperty(*, cloud_watch_logs=None, filters=None)

Bases: object

The logging destination in an Amazon Managed Service for Prometheus workspace.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingdestination.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

logging_destination_property = aps_mixins.CfnWorkspacePropsMixin.LoggingDestinationProperty(
    cloud_watch_logs=aps_mixins.CfnWorkspacePropsMixin.CloudWatchLogDestinationProperty(
        log_group_arn="logGroupArn"
    ),
    filters=aps_mixins.CfnWorkspacePropsMixin.LoggingFilterProperty(
        qsp_threshold=123
    )
)

Attributes

cloud_watch_logs

Configuration details for logging to CloudWatch Logs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingdestination.html#cfn-aps-workspace-loggingdestination-cloudwatchlogs

filters

Filtering criteria that determine which queries are logged.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingdestination.html#cfn-aps-workspace-loggingdestination-filters

LoggingFilterProperty

class CfnWorkspacePropsMixin.LoggingFilterProperty(*, qsp_threshold=None)

Bases: object

Filtering criteria that determine which queries are logged.

Parameters:

qsp_threshold (Union[int, float, None]) – The Query Samples Processed (QSP) threshold above which queries will be logged. Queries processing more samples than this threshold will be captured in logs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingfilter.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

logging_filter_property = aps_mixins.CfnWorkspacePropsMixin.LoggingFilterProperty(
    qsp_threshold=123
)

Attributes

qsp_threshold

The Query Samples Processed (QSP) threshold above which queries will be logged.

Queries processing more samples than this threshold will be captured in logs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingfilter.html#cfn-aps-workspace-loggingfilter-qspthreshold

QueryLoggingConfigurationProperty

class CfnWorkspacePropsMixin.QueryLoggingConfigurationProperty(*, destinations=None)

Bases: object

The query logging configuration in an Amazon Managed Service for Prometheus workspace.

Parameters:

destinations (Union[IResolvable, Sequence[Union[IResolvable, LoggingDestinationProperty, Dict[str, Any]]], None]) – Defines a destination and its associated filtering criteria for query logging.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-queryloggingconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

query_logging_configuration_property = aps_mixins.CfnWorkspacePropsMixin.QueryLoggingConfigurationProperty(
    destinations=[aps_mixins.CfnWorkspacePropsMixin.LoggingDestinationProperty(
        cloud_watch_logs=aps_mixins.CfnWorkspacePropsMixin.CloudWatchLogDestinationProperty(
            log_group_arn="logGroupArn"
        ),
        filters=aps_mixins.CfnWorkspacePropsMixin.LoggingFilterProperty(
            qsp_threshold=123
        )
    )]
)

Attributes

destinations

Defines a destination and its associated filtering criteria for query logging.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-queryloggingconfiguration.html#cfn-aps-workspace-queryloggingconfiguration-destinations

WorkspaceConfigurationProperty

class CfnWorkspacePropsMixin.WorkspaceConfigurationProperty(*, limits_per_label_sets=None, retention_period_in_days=None)

Bases: object

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.

Parameters:
  • limits_per_label_sets (Union[IResolvable, Sequence[Union[IResolvable, LimitsPerLabelSetProperty, Dict[str, Any]]], None]) – 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.

  • retention_period_in_days (Union[int, float, None]) – Specifies how many days that metrics will be retained in the workspace.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-workspaceconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_aps import mixins as aps_mixins

workspace_configuration_property = aps_mixins.CfnWorkspacePropsMixin.WorkspaceConfigurationProperty(
    limits_per_label_sets=[aps_mixins.CfnWorkspacePropsMixin.LimitsPerLabelSetProperty(
        label_set=[aps_mixins.CfnWorkspacePropsMixin.LabelProperty(
            name="name",
            value="value"
        )],
        limits=aps_mixins.CfnWorkspacePropsMixin.LimitsPerLabelSetEntryProperty(
            max_series=123
        )
    )],
    retention_period_in_days=123
)

Attributes

limits_per_label_sets

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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-workspaceconfiguration.html#cfn-aps-workspace-workspaceconfiguration-limitsperlabelsets

retention_period_in_days

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-workspaceconfiguration.html#cfn-aps-workspace-workspaceconfiguration-retentionperiodindays