aws-cdk-lib
Version:
Version 2 of the AWS Cloud Development Kit library
1,030 lines • 56.8 kB
TypeScript
import * as cdk from "../../core/lib";
import * as constructs from "constructs";
import * as cfn_parse from "../../core/lib/helpers-internal";
import { AnomalyDetectorReference, IAnomalyDetectorRef, IResourcePolicyRef, IRuleGroupsNamespaceRef, IScraperRef, IWorkspaceRef, ResourcePolicyReference, RuleGroupsNamespaceReference, ScraperReference, WorkspaceReference } from "../../interfaces/generated/aws-aps-interfaces.generated";
/**
* The definition of a rule groups namespace in an Amazon Managed Service for Prometheus workspace.
*
* A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces. For more information about rules files, see [Creating a rules file](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-ruler-rulesfile.html) , in the *Amazon Managed Service for Prometheus User Guide* .
*
* @cloudformationResource AWS::APS::RuleGroupsNamespace
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html
*/
export declare class CfnRuleGroupsNamespace extends cdk.CfnResource implements cdk.IInspectable, IRuleGroupsNamespaceRef, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnRuleGroupsNamespace from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnRuleGroupsNamespace;
/**
* Checks whether the given object is a CfnRuleGroupsNamespace
*/
static isCfnRuleGroupsNamespace(x: any): x is CfnRuleGroupsNamespace;
static arnForRuleGroupsNamespace(resource: IRuleGroupsNamespaceRef): string;
/**
* The ARN of the rule groups namespace. For example, `arn:aws:aps:<region>:123456789012:rulegroupsnamespace/ws-example1-1234-abcd-5678-ef90abcd1234/rulesfile1` .
*
* @cloudformationAttribute Arn
*/
readonly attrArn: string;
/**
* The rules file used in the namespace.
*/
data: string;
/**
* The name of the rule groups namespace.
*/
name: string;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* The list of tag keys and values that are associated with the rule groups namespace.
*/
tagsRaw?: Array<cdk.CfnTag>;
/**
* The ID of the workspace to add the rule groups namespace.
*/
workspace: string;
/**
* Create a new `AWS::APS::RuleGroupsNamespace`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnRuleGroupsNamespaceProps);
get ruleGroupsNamespaceRef(): RuleGroupsNamespaceReference;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
/**
* Properties for defining a `CfnRuleGroupsNamespace`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html
*/
export interface CfnRuleGroupsNamespaceProps {
/**
* The rules file used in the namespace.
*
* For more details about the rules file, see [Creating a rules file](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-ruler-rulesfile.html) in the *Amazon Managed Service for Prometheus User Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-data
*/
readonly data: string;
/**
* The name of the rule groups namespace.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-name
*/
readonly name: string;
/**
* The list of tag keys and values that are associated with the rule groups namespace.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-tags
*/
readonly tags?: Array<cdk.CfnTag>;
/**
* The ID of the workspace to add the rule groups namespace.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-rulegroupsnamespace.html#cfn-aps-rulegroupsnamespace-workspace
*/
readonly workspace: string;
}
/**
* An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.
*
* @cloudformationResource AWS::APS::Workspace
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html
*/
export declare class CfnWorkspace extends cdk.CfnResource implements cdk.IInspectable, IWorkspaceRef, cdk.ITaggable {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnWorkspace from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnWorkspace;
/**
* Checks whether the given object is a CfnWorkspace
*/
static isCfnWorkspace(x: any): x is CfnWorkspace;
static arnForWorkspace(resource: IWorkspaceRef): string;
/**
* The ARN of the workspace. For example, `arn:aws:aps:<region>:123456789012:workspace/ws-example1-1234-abcd-5678-ef90abcd1234` .
*
* @cloudformationAttribute Arn
*/
readonly attrArn: string;
/**
* The Prometheus endpoint available for this workspace. For example, `https://aps-workspaces.<region>.amazonaws.com/workspaces/ws-example1-1234-abcd-5678-ef90abcd1234/api/v1/` .
*
* @cloudformationAttribute PrometheusEndpoint
*/
readonly attrPrometheusEndpoint: string;
/**
* The unique ID for the workspace. For example, `ws-example1-1234-abcd-5678-ef90abcd1234` .
*
* @cloudformationAttribute WorkspaceId
*/
readonly attrWorkspaceId: string;
/**
* The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.
*/
alertManagerDefinition?: string;
/**
* The alias that is assigned to this workspace to help identify it.
*/
alias?: string;
/**
* (optional) The ARN for a customer managed AWS key to use for encrypting data within your workspace.
*/
kmsKeyArn?: string;
/**
* Contains information about the logging configuration for the workspace.
*/
loggingConfiguration?: cdk.IResolvable | CfnWorkspace.LoggingConfigurationProperty;
/**
* The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
*/
queryLoggingConfiguration?: cdk.IResolvable | CfnWorkspace.QueryLoggingConfigurationProperty;
/**
* Tag Manager which manages the tags for this resource
*/
readonly tags: cdk.TagManager;
/**
* The list of tag keys and values that are associated with the workspace.
*/
tagsRaw?: Array<cdk.CfnTag>;
/**
* 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.
*/
workspaceConfiguration?: cdk.IResolvable | CfnWorkspace.WorkspaceConfigurationProperty;
/**
* Create a new `AWS::APS::Workspace`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props?: CfnWorkspaceProps);
get workspaceRef(): WorkspaceReference;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnWorkspace {
/**
* Contains information about the rules and alerting logging configuration for the workspace.
*
* > These logging configurations are only for rules and alerting logs.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html
*/
interface LoggingConfigurationProperty {
/**
* 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
*/
readonly logGroupArn?: string;
}
/**
* 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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-workspaceconfiguration.html
*/
interface WorkspaceConfigurationProperty {
/**
* 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
*/
readonly limitsPerLabelSets?: Array<cdk.IResolvable | CfnWorkspace.LimitsPerLabelSetProperty> | cdk.IResolvable;
/**
* 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
*/
readonly retentionPeriodInDays?: number;
}
/**
* 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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelset.html
*/
interface LimitsPerLabelSetProperty {
/**
* 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
*/
readonly labelSet: Array<cdk.IResolvable | CfnWorkspace.LabelProperty> | cdk.IResolvable;
/**
* 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
*/
readonly limits: cdk.IResolvable | CfnWorkspace.LimitsPerLabelSetEntryProperty;
}
/**
* This structure contains the limits that apply to time series that match one label set.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-limitsperlabelsetentry.html
*/
interface LimitsPerLabelSetEntryProperty {
/**
* 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
*/
readonly maxSeries?: number;
}
/**
* 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.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-label.html
*/
interface LabelProperty {
/**
* 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
*/
readonly name: string;
/**
* 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
*/
readonly value: string;
}
/**
* The query logging configuration in an Amazon Managed Service for Prometheus workspace.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-queryloggingconfiguration.html
*/
interface QueryLoggingConfigurationProperty {
/**
* 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
*/
readonly destinations: Array<cdk.IResolvable | CfnWorkspace.LoggingDestinationProperty> | cdk.IResolvable;
}
/**
* The logging destination in an Amazon Managed Service for Prometheus workspace.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingdestination.html
*/
interface LoggingDestinationProperty {
/**
* 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
*/
readonly cloudWatchLogs: CfnWorkspace.CloudWatchLogDestinationProperty | cdk.IResolvable;
/**
* 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
*/
readonly filters: cdk.IResolvable | CfnWorkspace.LoggingFilterProperty;
}
/**
* Configuration details for logging to CloudWatch Logs.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-cloudwatchlogdestination.html
*/
interface CloudWatchLogDestinationProperty {
/**
* 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
*/
readonly logGroupArn: string;
}
/**
* Filtering criteria that determine which queries are logged.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingfilter.html
*/
interface LoggingFilterProperty {
/**
* 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
*/
readonly qspThreshold: number;
}
}
/**
* Properties for defining a `CfnWorkspace`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html
*/
export interface CfnWorkspaceProps {
/**
* 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}' -`
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-alertmanagerdefinition
*/
readonly alertManagerDefinition?: string;
/**
* The alias that is assigned to this workspace to help identify it.
*
* It does not need to be unique.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-alias
*/
readonly alias?: 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* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-kmskeyarn
*/
readonly kmsKeyArn?: string;
/**
* Contains information about the logging configuration for the workspace.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-loggingconfiguration
*/
readonly loggingConfiguration?: cdk.IResolvable | CfnWorkspace.LoggingConfigurationProperty;
/**
* The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-queryloggingconfiguration
*/
readonly queryLoggingConfiguration?: cdk.IResolvable | CfnWorkspace.QueryLoggingConfigurationProperty;
/**
* The list of tag keys and values that are associated with the workspace.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-tags
*/
readonly tags?: Array<cdk.CfnTag>;
/**
* 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.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-workspace.html#cfn-aps-workspace-workspaceconfiguration
*/
readonly workspaceConfiguration?: cdk.IResolvable | CfnWorkspace.WorkspaceConfigurationProperty;
}
/**
* Anomaly detection uses the Random Cut Forest algorithm for time-series analysis.
*
* The anomaly detector analyzes Amazon Managed Service for Prometheus metrics to identify unusual patterns and behaviors.
*
* @cloudformationResource AWS::APS::AnomalyDetector
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html
*/
export declare class CfnAnomalyDetector extends cdk.CfnResource implements cdk.IInspectable, IAnomalyDetectorRef, cdk.ITaggableV2 {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnAnomalyDetector from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnAnomalyDetector;
/**
* Checks whether the given object is a CfnAnomalyDetector
*/
static isCfnAnomalyDetector(x: any): x is CfnAnomalyDetector;
static arnForAnomalyDetector(resource: IAnomalyDetectorRef): string;
/**
* The Amazon Resource Name (ARN) of the anomaly detector.
*
* @cloudformationAttribute Arn
*/
readonly attrArn: string;
/**
* The user-friendly name of the anomaly detector.
*/
alias: string;
/**
* Tag Manager which manages the tags for this resource
*/
readonly cdkTagManager: cdk.TagManager;
/**
* The algorithm configuration of the anomaly detector.
*/
configuration: CfnAnomalyDetector.AnomalyDetectorConfigurationProperty | cdk.IResolvable;
/**
* The frequency, in seconds, at which the anomaly detector evaluates metrics.
*/
evaluationIntervalInSeconds?: number;
/**
* The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
*/
labels?: Array<cdk.IResolvable | CfnAnomalyDetector.LabelProperty> | cdk.IResolvable;
/**
* The action taken when data is missing during evaluation.
*/
missingDataAction?: cdk.IResolvable | CfnAnomalyDetector.MissingDataActionProperty;
/**
* The tags applied to the anomaly detector.
*/
tags?: Array<cdk.CfnTag>;
/**
* An Amazon Managed Service for Prometheus workspace is a logical and isolated Prometheus server dedicated to ingesting, storing, and querying your Prometheus-compatible metrics.
*/
workspace: string;
/**
* Create a new `AWS::APS::AnomalyDetector`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnAnomalyDetectorProps);
get anomalyDetectorRef(): AnomalyDetectorReference;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnAnomalyDetector {
/**
* The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-label.html
*/
interface LabelProperty {
/**
* The key of the label.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-label.html#cfn-aps-anomalydetector-label-key
*/
readonly key: string;
/**
* The value for this label.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-label.html#cfn-aps-anomalydetector-label-value
*/
readonly value: string;
}
/**
* Specifies the action to take when data is missing during anomaly detection evaluation.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-missingdataaction.html
*/
interface MissingDataActionProperty {
/**
* Marks missing data points as anomalies.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-missingdataaction.html#cfn-aps-anomalydetector-missingdataaction-markasanomaly
*/
readonly markAsAnomaly?: boolean | cdk.IResolvable;
/**
* Skips evaluation when data is missing.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-missingdataaction.html#cfn-aps-anomalydetector-missingdataaction-skip
*/
readonly skip?: boolean | cdk.IResolvable;
}
/**
* The configuration for the anomaly detection algorithm.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-anomalydetectorconfiguration.html
*/
interface AnomalyDetectorConfigurationProperty {
/**
* The Random Cut Forest algorithm configuration for anomaly detection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-anomalydetectorconfiguration.html#cfn-aps-anomalydetector-anomalydetectorconfiguration-randomcutforest
*/
readonly randomCutForest: cdk.IResolvable | CfnAnomalyDetector.RandomCutForestConfigurationProperty;
}
/**
* Configuration for the Random Cut Forest algorithm used for anomaly detection in time-series data.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-randomcutforestconfiguration.html
*/
interface RandomCutForestConfigurationProperty {
/**
* Configuration for ignoring values that are near expected values from above during anomaly detection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-randomcutforestconfiguration.html#cfn-aps-anomalydetector-randomcutforestconfiguration-ignorenearexpectedfromabove
*/
readonly ignoreNearExpectedFromAbove?: CfnAnomalyDetector.IgnoreNearExpectedProperty | cdk.IResolvable;
/**
* Configuration for ignoring values that are near expected values from below during anomaly detection.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-randomcutforestconfiguration.html#cfn-aps-anomalydetector-randomcutforestconfiguration-ignorenearexpectedfrombelow
*/
readonly ignoreNearExpectedFromBelow?: CfnAnomalyDetector.IgnoreNearExpectedProperty | cdk.IResolvable;
/**
* The Prometheus query used to retrieve the time-series data for anomaly detection.
*
* > Random Cut Forest queries must be wrapped by a supported PromQL aggregation operator. For more information, see [Aggregation operators](https://docs.aws.amazon.com/https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators) on the *Prometheus docs* website.
* >
* > *Supported PromQL aggregation operators* : `avg` , `count` , `group` , `max` , `min` , `quantile` , `stddev` , `stdvar` , and `sum` .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-randomcutforestconfiguration.html#cfn-aps-anomalydetector-randomcutforestconfiguration-query
*/
readonly query: string;
/**
* The number of data points sampled from the input stream for the Random Cut Forest algorithm.
*
* The default number is 256 consecutive data points.
*
* @default - 256
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-randomcutforestconfiguration.html#cfn-aps-anomalydetector-randomcutforestconfiguration-samplesize
*/
readonly sampleSize?: number;
/**
* The number of consecutive data points used to create a shingle for the Random Cut Forest algorithm.
*
* The default number is 8 consecutive data points.
*
* @default - 8
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-randomcutforestconfiguration.html#cfn-aps-anomalydetector-randomcutforestconfiguration-shinglesize
*/
readonly shingleSize?: number;
}
/**
* Configuration for threshold settings that determine when values near expected values should be ignored during anomaly detection.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-ignorenearexpected.html
*/
interface IgnoreNearExpectedProperty {
/**
* The absolute amount by which values can differ from expected values before being considered anomalous.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-ignorenearexpected.html#cfn-aps-anomalydetector-ignorenearexpected-amount
*/
readonly amount?: number;
/**
* The ratio by which values can differ from expected values before being considered anomalous.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-anomalydetector-ignorenearexpected.html#cfn-aps-anomalydetector-ignorenearexpected-ratio
*/
readonly ratio?: number;
}
}
/**
* Properties for defining a `CfnAnomalyDetector`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html
*/
export interface CfnAnomalyDetectorProps {
/**
* The user-friendly name of the anomaly detector.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html#cfn-aps-anomalydetector-alias
*/
readonly alias: string;
/**
* The algorithm configuration of the anomaly detector.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html#cfn-aps-anomalydetector-configuration
*/
readonly configuration: CfnAnomalyDetector.AnomalyDetectorConfigurationProperty | cdk.IResolvable;
/**
* The frequency, in seconds, at which the anomaly detector evaluates metrics.
*
* @default - 60
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html#cfn-aps-anomalydetector-evaluationintervalinseconds
*/
readonly evaluationIntervalInSeconds?: number;
/**
* The Amazon Managed Service for Prometheus metric labels associated with the anomaly detector.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html#cfn-aps-anomalydetector-labels
*/
readonly labels?: Array<cdk.IResolvable | CfnAnomalyDetector.LabelProperty> | cdk.IResolvable;
/**
* The action taken when data is missing during evaluation.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html#cfn-aps-anomalydetector-missingdataaction
*/
readonly missingDataAction?: cdk.IResolvable | CfnAnomalyDetector.MissingDataActionProperty;
/**
* The tags applied to the anomaly detector.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-anomalydetector.html#cfn-aps-anomalydetector-tags
*/
readonly tags?: Array<cdk.CfnTag>;
/**
* 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-anomalydetector.html#cfn-aps-anomalydetector-workspace
*/
readonly workspace: string;
}
/**
* Use resource-based policies to grant permissions to other AWS accounts or services to access your workspace.
*
* Only Prometheus-compatible APIs can be used for workspace sharing. You can add non-Prometheus-compatible APIs to the policy, but they will be ignored. For more information, see [Prometheus-compatible APIs](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-APIReference-Prometheus-Compatible-Apis.html) in the *Amazon Managed Service for Prometheus User Guide* .
*
* If your workspace uses customer-managed AWS keys for encryption, you must grant the principals in your resource-based policy access to those AWS keys. You can do this by creating AWS grants. For more information, see [CreateGrant](https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateGrant.html) in the *AWS API Reference* and [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* .
*
* For more information about working with IAM , see [Using Amazon Managed Service for Prometheus with IAM](https://docs.aws.amazon.com/prometheus/latest/userguide/security_iam_service-with-iam.html) in the *Amazon Managed Service for Prometheus User Guide* .
*
* @cloudformationResource AWS::APS::ResourcePolicy
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-resourcepolicy.html
*/
export declare class CfnResourcePolicy extends cdk.CfnResource implements cdk.IInspectable, IResourcePolicyRef {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnResourcePolicy from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnResourcePolicy;
/**
* Checks whether the given object is a CfnResourcePolicy
*/
static isCfnResourcePolicy(x: any): x is CfnResourcePolicy;
/**
* The JSON to use as the Resource-based Policy.
*/
policyDocument: string;
/**
* An ARN identifying a Workspace.
*/
workspaceArn: string;
/**
* Create a new `AWS::APS::ResourcePolicy`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnResourcePolicyProps);
get resourcePolicyRef(): ResourcePolicyReference;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
/**
* Properties for defining a `CfnResourcePolicy`
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-resourcepolicy.html
*/
export interface CfnResourcePolicyProps {
/**
* The JSON to use as the Resource-based Policy.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-resourcepolicy.html#cfn-aps-resourcepolicy-policydocument
*/
readonly policyDocument: string;
/**
* An ARN identifying a Workspace.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-resourcepolicy.html#cfn-aps-resourcepolicy-workspacearn
*/
readonly workspaceArn: string;
}
/**
* A scraper is a fully-managed agentless collector that discovers and pulls metrics automatically.
*
* A scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS cluster, and sends them to your Amazon Managed Service for Prometheus workspace. Scrapers are flexible. You can configure the scraper to control what metrics are collected, the frequency of collection, what transformations are applied to the metrics, and more.
*
* An IAM role will be created for you that Amazon Managed Service for Prometheus uses to access the metrics in your cluster. You must configure this role with a policy that allows it to scrape metrics from your cluster. For more information, see [Configuring your Amazon EKS cluster](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-eks-setup) in the *Amazon Managed Service for Prometheus User Guide* .
*
* The `scrapeConfiguration` parameter contains the YAML configuration for the scraper.
*
* > For more information about collectors, including what metrics are collected, and how to configure the scraper, see [Using an AWS managed collector](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html) in the *Amazon Managed Service for Prometheus User Guide* .
*
* @cloudformationResource AWS::APS::Scraper
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-scraper.html
*/
export declare class CfnScraper extends cdk.CfnResource implements cdk.IInspectable, IScraperRef, cdk.ITaggableV2 {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME: string;
/**
* Build a CfnScraper from CloudFormation properties
*
* A factory method that creates a new instance of this class from an object
* containing the CloudFormation properties of this resource.
* Used in the @aws-cdk/cloudformation-include module.
*
* @internal
*/
static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnScraper;
/**
* Checks whether the given object is a CfnScraper
*/
static isCfnScraper(x: any): x is CfnScraper;
static arnForScraper(resource: IScraperRef): string;
/**
* The Amazon Resource Name (ARN) of the scraper. For example, `arn:aws:aps:<region>:123456798012:scraper/s-example1-1234-abcd-5678-ef9012abcd34` .
*
* @cloudformationAttribute Arn
*/
readonly attrArn: string;
/**
* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover and collect metrics on your behalf.
*
* For example, `arn:aws:iam::123456789012:role/service-role/AmazonGrafanaServiceRole-12example` .
*
* @cloudformationAttribute RoleArn
*/
readonly attrRoleArn: string;
/**
* The ID of the scraper. For example, `s-example1-1234-abcd-5678-ef9012abcd34` .
*
* @cloudformationAttribute ScraperId
*/
readonly attrScraperId: string;
/**
* An optional user-assigned scraper alias.
*/
alias?: string;
/**
* Tag Manager which manages the tags for this resource
*/
readonly cdkTagManager: cdk.TagManager;
/**
* The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.
*/
destination: CfnScraper.DestinationProperty | cdk.IResolvable;
/**
* The role configuration in an Amazon Managed Service for Prometheus scraper.
*/
roleConfiguration?: cdk.IResolvable | CfnScraper.RoleConfigurationProperty;
/**
* The configuration in use by the scraper.
*/
scrapeConfiguration: cdk.IResolvable | CfnScraper.ScrapeConfigurationProperty;
/**
* The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.
*/
scraperLoggingConfiguration?: cdk.IResolvable | CfnScraper.ScraperLoggingConfigurationProperty;
/**
* The Amazon EKS cluster from which the scraper collects metrics.
*/
source: cdk.IResolvable | CfnScraper.SourceProperty;
/**
* (Optional) The list of tag keys and values associated with the scraper.
*/
tags?: Array<cdk.CfnTag>;
/**
* Create a new `AWS::APS::Scraper`.
*
* @param scope Scope in which this resource is defined
* @param id Construct identifier for this resource (unique in its scope)
* @param props Resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnScraperProps);
get scraperRef(): ScraperReference;
protected get cfnProperties(): Record<string, any>;
/**
* Examines the CloudFormation resource and discloses attributes
*
* @param inspector tree inspector to collect and process attributes
*/
inspect(inspector: cdk.TreeInspector): void;
protected renderProperties(props: Record<string, any>): Record<string, any>;
}
export declare namespace CfnScraper {
/**
* Configuration for scraper logging.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingconfiguration.html
*/
interface ScraperLoggingConfigurationProperty {
/**
* Destination for scraper logging.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingconfiguration.html#cfn-aps-scraper-scraperloggingconfiguration-loggingdestination
*/
readonly loggingDestination: cdk.IResolvable | CfnScraper.ScraperLoggingDestinationProperty;
/**
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingconfiguration.html#cfn-aps-scraper-scraperloggingconfiguration-scrapercomponents
*/
readonly scraperComponents: Array<cdk.IResolvable | CfnScraper.ScraperComponentProperty> | cdk.IResolvable;
}
/**
* A component of a Amazon Managed Service for Prometheus scraper that can be configured for logging.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scrapercomponent.html
*/
interface ScraperComponentProperty {
/**
* The configuration settings for the scraper component.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scrapercomponent.html#cfn-aps-scraper-scrapercomponent-config
*/
readonly config?: CfnScraper.ComponentConfigProperty | cdk.IResolvable;
/**
* The type of the scraper component.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scrapercomponent.html#cfn-aps-scraper-scrapercomponent-type
*/
readonly type: string;
}
/**
* Configuration settings for a scraper component.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-componentconfig.html
*/
interface ComponentConfigProperty {
/**
* Configuration options for the scraper component.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-componentconfig.html#cfn-aps-scraper-componentconfig-options
*/
readonly options?: cdk.IResolvable | Record<string, string>;
}
/**
* The destination where scraper logs are sent.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingdestination.html
*/
interface ScraperLoggingDestinationProperty {
/**
* The CloudWatch Logs configuration for the scraper logging destination.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scraperloggingdestination.html#cfn-aps-scraper-scraperloggingdestination-cloudwatchlogs
*/
readonly cloudWatchLogs?: CfnScraper.CloudWatchLogDestinationProperty | cdk.IResolvable;
}
/**
* Represents a cloudwatch logs destination for scraper logging.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-cloudwatchlogdestination.html
*/
interface CloudWatchLogDestinationProperty {
/**
* ARN of the CloudWatch log group.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-cloudwatchlogdestination.html#cfn-aps-scraper-cloudwatchlogdestination-loggrouparn
*/
readonly logGroupArn?: string;
}
/**
* A scrape configuration for a scraper, base 64 encoded.
*
* For more information, see [Scraper configuration](https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-collector-how-to.html#AMP-collector-configuration) in the *Amazon Managed Service for Prometheus User Guide* .
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scrapeconfiguration.html
*/
interface ScrapeConfigurationProperty {
/**
* The base 64 encoded scrape configuration file.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-scrapeconfiguration.html#cfn-aps-scraper-scrapeconfiguration-configurationblob
*/
readonly configurationBlob: string;
}
/**
* The role configuration in an Amazon Managed Service for Prometheus scraper.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-roleconfiguration.html
*/
interface RoleConfigurationProperty {
/**
* The ARN of the source role.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-roleconfiguration.html#cfn-aps-scraper-roleconfiguration-sourcerolearn
*/
readonly sourceRoleArn?: string;
/**
* The ARN of the target role.
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-roleconfiguration.html#cfn-aps-scraper-roleconfiguration-targetrolearn
*/
readonly targetRoleArn?: string;
}
/**
* The source of collected metrics for a scraper.
*
* @struct
* @stability external
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-scraper-source.html
*/
interface SourceProperty {
/**