# CfnScraperProps

Properties for defining a `CfnScraper`.

Extends: CfnScraperProps
Used as props by: CfnScraper

- Source: Generated code
- Type last changed: v2.217.0 · 25 Sep 2025

## 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 cfnScraperProps: aps.CfnScraperProps = {
  destination: {
    ampConfiguration: {
      workspaceArn: 'workspaceArn',
    },
    cloudWatchConfiguration: {
      datasetArn: 'datasetArn',
    },
  },
  scrapeConfiguration: {
    configurationBlob: 'configurationBlob',
  },
  source: {
    eksConfiguration: {
      clusterArn: 'clusterArn',
      subnetIds: ['subnetIds'],

      // the properties below are optional
      securityGroupIds: ['securityGroupIds'],
    },
    vpcConfiguration: {
      securityGroupIds: ['securityGroupIds'],
      subnetIds: ['subnetIds'],
    },
  },

  // the properties below are optional
  alias: 'alias',
  roleConfiguration: {
    sourceRoleArn: 'sourceRoleArn',
    targetRoleArn: 'targetRoleArn',
  },
  scraperLoggingConfiguration: {
    loggingDestination: {
      cloudWatchLogs: {
        logGroupArn: 'logGroupArn',
      },
    },
    scraperComponents: [{
      type: 'type',

      // the properties below are optional
      config: {
        options: {
          optionsKey: 'options',
        },
      },
    }],
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `alias`: string — An optional user-assigned scraper alias.

- `destination`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnScraper.DestinationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnScraper.DestinationProperty.html) (required) — The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.

- `roleConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnScraper.RoleConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnScraper.RoleConfigurationProperty.html) — The role configuration in an Amazon Managed Service for Prometheus scraper.

- `scrapeConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnScraper.ScrapeConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnScraper.ScrapeConfigurationProperty.html) (required) — The configuration in use by the scraper.

- `scraperLoggingConfiguration`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnScraper.ScraperLoggingConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnScraper.ScraperLoggingConfigurationProperty.html) — The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.

- `source`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnScraper.SourceProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_aps.CfnScraper.SourceProperty.html) (required) — The Amazon EKS cluster from which the scraper collects metrics.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — (Optional) The list of tag keys and values associated with the scraper.
