CfnWorkspacePropsMixin
- class aws_cdk.mixins_preview.aws_aps.mixins.CfnWorkspacePropsMixin(props, *, strategy=None)
Bases:
MixinAn 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:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
CloudWatchLogDestinationProperty
- class CfnWorkspacePropsMixin.CloudWatchLogDestinationProperty(*, log_group_arn=None)
Bases:
objectConfiguration details for logging to CloudWatch Logs.
- Parameters:
log_group_arn (
Optional[str]) – The ARN of the CloudWatch log group.- See:
- 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.
LabelProperty
- class CfnWorkspacePropsMixin.LabelProperty(*, name=None, value=None)
Bases:
objectA 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:
- 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.
- value
The value for this label.
LimitsPerLabelSetEntryProperty
- class CfnWorkspacePropsMixin.LimitsPerLabelSetEntryProperty(*, max_series=None)
Bases:
objectThis 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:
- 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
LimitsPerLabelSetProperty
- class CfnWorkspacePropsMixin.LimitsPerLabelSetProperty(*, label_set=None, limits=None)
Bases:
objectThis 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:
- 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_:]*
- limits
This structure contains the information about the limits that apply to time series that match this label set.
LoggingConfigurationProperty
- class CfnWorkspacePropsMixin.LoggingConfigurationProperty(*, log_group_arn=None)
Bases:
objectContains 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:
- 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.
LoggingDestinationProperty
- class CfnWorkspacePropsMixin.LoggingDestinationProperty(*, cloud_watch_logs=None, filters=None)
Bases:
objectThe logging destination in an Amazon Managed Service for Prometheus workspace.
- Parameters:
cloud_watch_logs (
Union[IResolvable,CloudWatchLogDestinationProperty,Dict[str,Any],None]) – Configuration details for logging to CloudWatch Logs.filters (
Union[IResolvable,LoggingFilterProperty,Dict[str,Any],None]) – Filtering criteria that determine which queries are logged.
- See:
- 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.
- filters
Filtering criteria that determine which queries are logged.
LoggingFilterProperty
- class CfnWorkspacePropsMixin.LoggingFilterProperty(*, qsp_threshold=None)
Bases:
objectFiltering 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:
- 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.
QueryLoggingConfigurationProperty
- class CfnWorkspacePropsMixin.QueryLoggingConfigurationProperty(*, destinations=None)
Bases:
objectThe 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:
- 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.
WorkspaceConfigurationProperty
- class CfnWorkspacePropsMixin.WorkspaceConfigurationProperty(*, limits_per_label_sets=None, retention_period_in_days=None)
Bases:
objectUse 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:
- 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.
- retention_period_in_days
Specifies how many days that metrics will be retained in the workspace.