class CfnScraperPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.APS.Mixins.CfnScraperPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsaps/mixins#CfnScraperPropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.aps.mixins.CfnScraperPropsMixin |
Python | aws_cdk.mixins_preview.aws_aps.mixins.CfnScraperPropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_aps » mixins » CfnScraperPropsMixin |
Implements
IMixin
Extends
Mixin
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 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 in the Amazon Managed Service for Prometheus User Guide .
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-aps-scraper.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as aps_mixins } from '@aws-cdk/mixins-preview/aws-aps';
const cfnScraperPropsMixin = new aps_mixins.CfnScraperPropsMixin({
alias: 'alias',
destination: {
ampConfiguration: {
workspaceArn: 'workspaceArn',
},
},
roleConfiguration: {
sourceRoleArn: 'sourceRoleArn',
targetRoleArn: 'targetRoleArn',
},
scrapeConfiguration: {
configurationBlob: 'configurationBlob',
},
scraperLoggingConfiguration: {
loggingDestination: {
cloudWatchLogs: {
logGroupArn: 'logGroupArn',
},
},
scraperComponents: [{
config: {
options: {
optionsKey: 'options',
},
},
type: 'type',
}],
},
source: {
eksConfiguration: {
clusterArn: 'clusterArn',
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
},
vpcConfiguration: {
securityGroupIds: ['securityGroupIds'],
subnetIds: ['subnetIds'],
},
},
tags: [{
key: 'key',
value: 'value',
}],
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnScraperPropsMixin(props: CfnScraperMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Scraper Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::APS::Scraper.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript