1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. amp
  6. Scraper
Viewing docs for AWS v7.48.0
published on Tuesday, Sep 22, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.48.0
published on Tuesday, Sep 22, 2026 by Pulumi

    Note: If you change a Scraper’s source (EKS cluster or VPC configuration), Terraform will delete the current Scraper and create a new one.

    Provides an Amazon Managed Service for Prometheus fully managed collector (scraper).

    Read more in the Amazon Managed Service for Prometheus user guide.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.amp.Scraper("example", {
        source: {
            eks: {
                clusterArn: exampleAwsEksCluster.arn,
                subnetIds: exampleAwsEksCluster.vpcConfig[0].subnetIds,
            },
        },
        destination: {
            amp: {
                workspaceArn: exampleAwsPrometheusWorkspace.arn,
            },
        },
        scrapeConfiguration: `global:
      scrape_interval: 30s
    scrape_configs:
      # pod metrics
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
      # container metrics
      - job_name: cadvisor
        scheme: https
        authorization:
          credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        kubernetes_sd_configs:
          - role: node
        relabel_configs:
          - action: labelmap
            regex: __meta_kubernetes_node_label_(.+)
          - replacement: kubernetes.default.svc:443
            target_label: __address__
          - source_labels: [__meta_kubernetes_node_name]
            regex: (.+)
            target_label: __metrics_path__
            replacement: /api/v1/nodes/1/proxy/metrics/cadvisor
      # apiserver metrics
      - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        job_name: kubernetes-apiservers
        kubernetes_sd_configs:
        - role: endpoints
        relabel_configs:
        - action: keep
          regex: default;kubernetes;https
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_service_name
          - __meta_kubernetes_endpoint_port_name
        scheme: https
      # kube proxy metrics
      - job_name: kube-proxy
        honor_labels: true
        kubernetes_sd_configs:
        - role: pod
        relabel_configs:
        - action: keep
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_pod_name
          separator: '/'
          regex: 'kube-system/kube-proxy.+'
        - source_labels:
          - __address__
          action: replace
          target_label: __address__
          regex: (.+?)(\\\\\\\\:\\\\\\\\d+)?
          replacement: 1:10249
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.Scraper("example",
        source={
            "eks": {
                "cluster_arn": example_aws_eks_cluster["arn"],
                "subnet_ids": example_aws_eks_cluster["vpcConfig"][0]["subnetIds"],
            },
        },
        destination={
            "amp": {
                "workspace_arn": example_aws_prometheus_workspace["arn"],
            },
        },
        scrape_configuration="""global:
      scrape_interval: 30s
    scrape_configs:
      # pod metrics
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
      # container metrics
      - job_name: cadvisor
        scheme: https
        authorization:
          credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        kubernetes_sd_configs:
          - role: node
        relabel_configs:
          - action: labelmap
            regex: __meta_kubernetes_node_label_(.+)
          - replacement: kubernetes.default.svc:443
            target_label: __address__
          - source_labels: [__meta_kubernetes_node_name]
            regex: (.+)
            target_label: __metrics_path__
            replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
      # apiserver metrics
      - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        job_name: kubernetes-apiservers
        kubernetes_sd_configs:
        - role: endpoints
        relabel_configs:
        - action: keep
          regex: default;kubernetes;https
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_service_name
          - __meta_kubernetes_endpoint_port_name
        scheme: https
      # kube proxy metrics
      - job_name: kube-proxy
        honor_labels: true
        kubernetes_sd_configs:
        - role: pod
        relabel_configs:
        - action: keep
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_pod_name
          separator: '/'
          regex: 'kube-system/kube-proxy.+'
        - source_labels:
          - __address__
          action: replace
          target_label: __address__
          regex: (.+?)(\\\\:\\\\d+)?
          replacement: $1:10249
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/amp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := amp.NewScraper(ctx, "example", &amp.ScraperArgs{
    			Source: &amp.ScraperSourceArgs{
    				Eks: &amp.ScraperSourceEksArgs{
    					ClusterArn: pulumi.Any(exampleAwsEksCluster.Arn),
    					SubnetIds:  pulumi.Any(exampleAwsEksCluster.VpcConfig[0].SubnetIds),
    				},
    			},
    			Destination: &amp.ScraperDestinationArgs{
    				Amp: &amp.ScraperDestinationAmpArgs{
    					WorkspaceArn: pulumi.Any(exampleAwsPrometheusWorkspace.Arn),
    				},
    			},
    			ScrapeConfiguration: pulumi.String(`global:
      scrape_interval: 30s
    scrape_configs:
      # pod metrics
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
      # container metrics
      - job_name: cadvisor
        scheme: https
        authorization:
          credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        kubernetes_sd_configs:
          - role: node
        relabel_configs:
          - action: labelmap
            regex: __meta_kubernetes_node_label_(.+)
          - replacement: kubernetes.default.svc:443
            target_label: __address__
          - source_labels: [__meta_kubernetes_node_name]
            regex: (.+)
            target_label: __metrics_path__
            replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
      # apiserver metrics
      - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        job_name: kubernetes-apiservers
        kubernetes_sd_configs:
        - role: endpoints
        relabel_configs:
        - action: keep
          regex: default;kubernetes;https
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_service_name
          - __meta_kubernetes_endpoint_port_name
        scheme: https
      # kube proxy metrics
      - job_name: kube-proxy
        honor_labels: true
        kubernetes_sd_configs:
        - role: pod
        relabel_configs:
        - action: keep
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_pod_name
          separator: '/'
          regex: 'kube-system/kube-proxy.+'
        - source_labels:
          - __address__
          action: replace
          target_label: __address__
          regex: (.+?)(\\\\:\\\\d+)?
          replacement: $1:10249
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Amp.Scraper("example", new()
        {
            Source = new Aws.Amp.Inputs.ScraperSourceArgs
            {
                Eks = new Aws.Amp.Inputs.ScraperSourceEksArgs
                {
                    ClusterArn = exampleAwsEksCluster.Arn,
                    SubnetIds = exampleAwsEksCluster.VpcConfig[0].SubnetIds,
                },
            },
            Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
            {
                Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
                {
                    WorkspaceArn = exampleAwsPrometheusWorkspace.Arn,
                },
            },
            ScrapeConfiguration = @"global:
      scrape_interval: 30s
    scrape_configs:
      # pod metrics
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
      # container metrics
      - job_name: cadvisor
        scheme: https
        authorization:
          credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        kubernetes_sd_configs:
          - role: node
        relabel_configs:
          - action: labelmap
            regex: __meta_kubernetes_node_label_(.+)
          - replacement: kubernetes.default.svc:443
            target_label: __address__
          - source_labels: [__meta_kubernetes_node_name]
            regex: (.+)
            target_label: __metrics_path__
            replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
      # apiserver metrics
      - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        job_name: kubernetes-apiservers
        kubernetes_sd_configs:
        - role: endpoints
        relabel_configs:
        - action: keep
          regex: default;kubernetes;https
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_service_name
          - __meta_kubernetes_endpoint_port_name
        scheme: https
      # kube proxy metrics
      - job_name: kube-proxy
        honor_labels: true
        kubernetes_sd_configs:
        - role: pod
        relabel_configs:
        - action: keep
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_pod_name
          separator: '/'
          regex: 'kube-system/kube-proxy.+'
        - source_labels:
          - __address__
          action: replace
          target_label: __address__
          regex: (.+?)(\\\\:\\\\d+)?
          replacement: $1:10249
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.Scraper;
    import com.pulumi.aws.amp.ScraperArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceEksArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationAmpArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Scraper("example", ScraperArgs.builder()
                .source(ScraperSourceArgs.builder()
                    .eks(ScraperSourceEksArgs.builder()
                        .clusterArn(exampleAwsEksCluster.arn())
                        .subnetIds(exampleAwsEksCluster.vpcConfig()[0].subnetIds())
                        .build())
                    .build())
                .destination(ScraperDestinationArgs.builder()
                    .amp(ScraperDestinationAmpArgs.builder()
                        .workspaceArn(exampleAwsPrometheusWorkspace.arn())
                        .build())
                    .build())
                .scrapeConfiguration("""
    global:
      scrape_interval: 30s
    scrape_configs:
      # pod metrics
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
      # container metrics
      - job_name: cadvisor
        scheme: https
        authorization:
          credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        kubernetes_sd_configs:
          - role: node
        relabel_configs:
          - action: labelmap
            regex: __meta_kubernetes_node_label_(.+)
          - replacement: kubernetes.default.svc:443
            target_label: __address__
          - source_labels: [__meta_kubernetes_node_name]
            regex: (.+)
            target_label: __metrics_path__
            replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
      # apiserver metrics
      - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        job_name: kubernetes-apiservers
        kubernetes_sd_configs:
        - role: endpoints
        relabel_configs:
        - action: keep
          regex: default;kubernetes;https
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_service_name
          - __meta_kubernetes_endpoint_port_name
        scheme: https
      # kube proxy metrics
      - job_name: kube-proxy
        honor_labels: true
        kubernetes_sd_configs:
        - role: pod
        relabel_configs:
        - action: keep
          source_labels:
          - __meta_kubernetes_namespace
          - __meta_kubernetes_pod_name
          separator: '/'
          regex: 'kube-system/kube-proxy.+'
        - source_labels:
          - __address__
          action: replace
          target_label: __address__
          regex: (.+?)(\\\\:\\\\d+)?
          replacement: $1:10249
                """)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:amp:Scraper
        properties:
          source:
            eks:
              clusterArn: ${exampleAwsEksCluster.arn}
              subnetIds: ${exampleAwsEksCluster.vpcConfig[0].subnetIds}
          destination:
            amp:
              workspaceArn: ${exampleAwsPrometheusWorkspace.arn}
          scrapeConfiguration: |
            global:
              scrape_interval: 30s
            scrape_configs:
              # pod metrics
              - job_name: pod_exporter
                kubernetes_sd_configs:
                  - role: pod
              # container metrics
              - job_name: cadvisor
                scheme: https
                authorization:
                  credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
                kubernetes_sd_configs:
                  - role: node
                relabel_configs:
                  - action: labelmap
                    regex: __meta_kubernetes_node_label_(.+)
                  - replacement: kubernetes.default.svc:443
                    target_label: __address__
                  - source_labels: [__meta_kubernetes_node_name]
                    regex: (.+)
                    target_label: __metrics_path__
                    replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
              # apiserver metrics
              - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
                job_name: kubernetes-apiservers
                kubernetes_sd_configs:
                - role: endpoints
                relabel_configs:
                - action: keep
                  regex: default;kubernetes;https
                  source_labels:
                  - __meta_kubernetes_namespace
                  - __meta_kubernetes_service_name
                  - __meta_kubernetes_endpoint_port_name
                scheme: https
              # kube proxy metrics
              - job_name: kube-proxy
                honor_labels: true
                kubernetes_sd_configs:
                - role: pod
                relabel_configs:
                - action: keep
                  source_labels:
                  - __meta_kubernetes_namespace
                  - __meta_kubernetes_pod_name
                  separator: '/'
                  regex: 'kube-system/kube-proxy.+'
                - source_labels:
                  - __address__
                  action: replace
                  target_label: __address__
                  regex: (.+?)(\\\\:\\\\d+)?
                  replacement: $1:10249
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_amp_scraper" "example" {
      source = {
        eks = {
          cluster_arn = exampleAwsEksCluster.arn
          subnet_ids  = exampleAwsEksCluster.vpcConfig[0].subnetIds
        }
      }
      destination = {
        amp = {
          workspace_arn = exampleAwsPrometheusWorkspace.arn
        }
      }
      scrape_configuration = "global:\n  scrape_interval: 30s\nscrape_configs:\n  # pod metrics\n  - job_name: pod_exporter\n    kubernetes_sd_configs:\n      - role: pod\n  # container metrics\n  - job_name: cadvisor\n    scheme: https\n    authorization:\n      credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token\n    kubernetes_sd_configs:\n      - role: node\n    relabel_configs:\n      - action: labelmap\n        regex: __meta_kubernetes_node_label_(.+)\n      - replacement: kubernetes.default.svc:443\n        target_label: __address__\n      - source_labels: [__meta_kubernetes_node_name]\n        regex: (.+)\n        target_label: __metrics_path__\n        replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor\n  # apiserver metrics\n  - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token\n    job_name: kubernetes-apiservers\n    kubernetes_sd_configs:\n    - role: endpoints\n    relabel_configs:\n    - action: keep\n      regex: default;kubernetes;https\n      source_labels:\n      - __meta_kubernetes_namespace\n      - __meta_kubernetes_service_name\n      - __meta_kubernetes_endpoint_port_name\n    scheme: https\n  # kube proxy metrics\n  - job_name: kube-proxy\n    honor_labels: true\n    kubernetes_sd_configs:\n    - role: pod\n    relabel_configs:\n    - action: keep\n      source_labels:\n      - __meta_kubernetes_namespace\n      - __meta_kubernetes_pod_name\n      separator: '/'\n      regex: 'kube-system/kube-proxy.+'\n    - source_labels:\n      - __address__\n      action: replace\n      target_label: __address__\n      regex: (.+?)(\\\\\\\\:\\\\\\\\d+)?\n      replacement: $1:10249\n"
    }
    

    CloudWatch Destination

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.amp.Scraper("example", {
        source: {
            eks: {
                clusterArn: exampleAwsEksCluster.arn,
                subnetIds: exampleAwsEksCluster.vpcConfig[0].subnetIds,
            },
        },
        destination: {
            cloudwatch: {
                datasetArn: "arn:aws:cloudwatch:us-west-2:123456789012:dataset/default",
            },
        },
        scrapeConfiguration: `global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.Scraper("example",
        source={
            "eks": {
                "cluster_arn": example_aws_eks_cluster["arn"],
                "subnet_ids": example_aws_eks_cluster["vpcConfig"][0]["subnetIds"],
            },
        },
        destination={
            "cloudwatch": {
                "dataset_arn": "arn:aws:cloudwatch:us-west-2:123456789012:dataset/default",
            },
        },
        scrape_configuration="""global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/amp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := amp.NewScraper(ctx, "example", &amp.ScraperArgs{
    			Source: &amp.ScraperSourceArgs{
    				Eks: &amp.ScraperSourceEksArgs{
    					ClusterArn: pulumi.Any(exampleAwsEksCluster.Arn),
    					SubnetIds:  pulumi.Any(exampleAwsEksCluster.VpcConfig[0].SubnetIds),
    				},
    			},
    			Destination: &amp.ScraperDestinationArgs{
    				Cloudwatch: &amp.ScraperDestinationCloudwatchArgs{
    					DatasetArn: pulumi.String("arn:aws:cloudwatch:us-west-2:123456789012:dataset/default"),
    				},
    			},
    			ScrapeConfiguration: pulumi.String(`global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Amp.Scraper("example", new()
        {
            Source = new Aws.Amp.Inputs.ScraperSourceArgs
            {
                Eks = new Aws.Amp.Inputs.ScraperSourceEksArgs
                {
                    ClusterArn = exampleAwsEksCluster.Arn,
                    SubnetIds = exampleAwsEksCluster.VpcConfig[0].SubnetIds,
                },
            },
            Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
            {
                Cloudwatch = new Aws.Amp.Inputs.ScraperDestinationCloudwatchArgs
                {
                    DatasetArn = "arn:aws:cloudwatch:us-west-2:123456789012:dataset/default",
                },
            },
            ScrapeConfiguration = @"global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.Scraper;
    import com.pulumi.aws.amp.ScraperArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceEksArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationCloudwatchArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Scraper("example", ScraperArgs.builder()
                .source(ScraperSourceArgs.builder()
                    .eks(ScraperSourceEksArgs.builder()
                        .clusterArn(exampleAwsEksCluster.arn())
                        .subnetIds(exampleAwsEksCluster.vpcConfig()[0].subnetIds())
                        .build())
                    .build())
                .destination(ScraperDestinationArgs.builder()
                    .cloudwatch(ScraperDestinationCloudwatchArgs.builder()
                        .datasetArn("arn:aws:cloudwatch:us-west-2:123456789012:dataset/default")
                        .build())
                    .build())
                .scrapeConfiguration("""
    global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: pod_exporter
        kubernetes_sd_configs:
          - role: pod
                """)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:amp:Scraper
        properties:
          source:
            eks:
              clusterArn: ${exampleAwsEksCluster.arn}
              subnetIds: ${exampleAwsEksCluster.vpcConfig[0].subnetIds}
          destination:
            cloudwatch:
              datasetArn: arn:aws:cloudwatch:us-west-2:123456789012:dataset/default
          scrapeConfiguration: |
            global:
              scrape_interval: 30s
            scrape_configs:
              - job_name: pod_exporter
                kubernetes_sd_configs:
                  - role: pod
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_amp_scraper" "example" {
      source = {
        eks = {
          cluster_arn = exampleAwsEksCluster.arn
          subnet_ids  = exampleAwsEksCluster.vpcConfig[0].subnetIds
        }
      }
      destination = {
        cloudwatch = {
          dataset_arn = "arn:aws:cloudwatch:us-west-2:123456789012:dataset/default"
        }
      }
      scrape_configuration = "global:\n  scrape_interval: 30s\nscrape_configs:\n  - job_name: pod_exporter\n    kubernetes_sd_configs:\n      - role: pod\n"
    }
    

    VPC Configuration

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.amp.Scraper("example", {
        source: {
            vpc: {
                securityGroupIds: [exampleAwsSecurityGroup.id],
                subnetIds: [
                    example1.id,
                    example2.id,
                ],
            },
        },
        destination: {
            amp: {
                workspaceArn: exampleAwsPrometheusWorkspace.arn,
            },
        },
        scrapeConfiguration: `global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
        relabel_configs:
          - target_label: service_name
            replacement: 'my-service'
          - target_label: discovery_method
            replacement: 'cloudmap-dns'
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.Scraper("example",
        source={
            "vpc": {
                "security_group_ids": [example_aws_security_group["id"]],
                "subnet_ids": [
                    example1["id"],
                    example2["id"],
                ],
            },
        },
        destination={
            "amp": {
                "workspace_arn": example_aws_prometheus_workspace["arn"],
            },
        },
        scrape_configuration="""global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
        relabel_configs:
          - target_label: service_name
            replacement: 'my-service'
          - target_label: discovery_method
            replacement: 'cloudmap-dns'
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/amp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := amp.NewScraper(ctx, "example", &amp.ScraperArgs{
    			Source: &amp.ScraperSourceArgs{
    				Vpc: &amp.ScraperSourceVpcArgs{
    					SecurityGroupIds: pulumi.StringArray{
    						exampleAwsSecurityGroup.Id,
    					},
    					SubnetIds: pulumi.StringArray{
    						example1.Id,
    						example2.Id,
    					},
    				},
    			},
    			Destination: &amp.ScraperDestinationArgs{
    				Amp: &amp.ScraperDestinationAmpArgs{
    					WorkspaceArn: pulumi.Any(exampleAwsPrometheusWorkspace.Arn),
    				},
    			},
    			ScrapeConfiguration: pulumi.String(`global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
        relabel_configs:
          - target_label: service_name
            replacement: 'my-service'
          - target_label: discovery_method
            replacement: 'cloudmap-dns'
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Amp.Scraper("example", new()
        {
            Source = new Aws.Amp.Inputs.ScraperSourceArgs
            {
                Vpc = new Aws.Amp.Inputs.ScraperSourceVpcArgs
                {
                    SecurityGroupIds = new[]
                    {
                        exampleAwsSecurityGroup.Id,
                    },
                    SubnetIds = new[]
                    {
                        example1.Id,
                        example2.Id,
                    },
                },
            },
            Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
            {
                Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
                {
                    WorkspaceArn = exampleAwsPrometheusWorkspace.Arn,
                },
            },
            ScrapeConfiguration = @"global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
        relabel_configs:
          - target_label: service_name
            replacement: 'my-service'
          - target_label: discovery_method
            replacement: 'cloudmap-dns'
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.Scraper;
    import com.pulumi.aws.amp.ScraperArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceVpcArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationAmpArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Scraper("example", ScraperArgs.builder()
                .source(ScraperSourceArgs.builder()
                    .vpc(ScraperSourceVpcArgs.builder()
                        .securityGroupIds(exampleAwsSecurityGroup.id())
                        .subnetIds(                    
                            example1.id(),
                            example2.id())
                        .build())
                    .build())
                .destination(ScraperDestinationArgs.builder()
                    .amp(ScraperDestinationAmpArgs.builder()
                        .workspaceArn(exampleAwsPrometheusWorkspace.arn())
                        .build())
                    .build())
                .scrapeConfiguration("""
    global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
        relabel_configs:
          - target_label: service_name
            replacement: 'my-service'
          - target_label: discovery_method
            replacement: 'cloudmap-dns'
                """)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:amp:Scraper
        properties:
          source:
            vpc:
              securityGroupIds:
                - ${exampleAwsSecurityGroup.id}
              subnetIds:
                - ${example1.id}
                - ${example2.id}
          destination:
            amp:
              workspaceArn: ${exampleAwsPrometheusWorkspace.arn}
          scrapeConfiguration: |
            global:
              scrape_interval: 30s
            scrape_configs:
              - job_name: 'my-service'
                dns_sd_configs:
                  - names: ['my-service.my-namespace']
                    type: A
                    port: 8080
                metrics_path: '/metrics'
                relabel_configs:
                  - target_label: service_name
                    replacement: 'my-service'
                  - target_label: discovery_method
                    replacement: 'cloudmap-dns'
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_amp_scraper" "example" {
      source = {
        vpc = {
          security_group_ids = [exampleAwsSecurityGroup.id]
          subnet_ids         = [example1.id, example2.id]
        }
      }
      destination = {
        amp = {
          workspace_arn = exampleAwsPrometheusWorkspace.arn
        }
      }
      scrape_configuration = "global:\n  scrape_interval: 30s\nscrape_configs:\n  - job_name: 'my-service'\n    dns_sd_configs:\n      - names: ['my-service.my-namespace']\n        type: A\n        port: 8080\n    metrics_path: '/metrics'\n    relabel_configs:\n      - target_label: service_name\n        replacement: 'my-service'\n      - target_label: discovery_method\n        replacement: 'cloudmap-dns'\n"
    }
    

    OpenSearch Exporter

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.amp.Scraper("example", {
        source: {
            vpc: {
                securityGroupIds: [exampleAwsSecurityGroup.id],
                subnetIds: [
                    example1.id,
                    example2.id,
                ],
            },
        },
        destination: {
            amp: {
                workspaceArn: exampleAwsPrometheusWorkspace.arn,
            },
        },
        exporter: {
            opensearch: {
                domainArn: exampleAwsOpensearchDomain.arn,
            },
        },
        scrapeConfiguration: `global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.Scraper("example",
        source={
            "vpc": {
                "security_group_ids": [example_aws_security_group["id"]],
                "subnet_ids": [
                    example1["id"],
                    example2["id"],
                ],
            },
        },
        destination={
            "amp": {
                "workspace_arn": example_aws_prometheus_workspace["arn"],
            },
        },
        exporter={
            "opensearch": {
                "domain_arn": example_aws_opensearch_domain["arn"],
            },
        },
        scrape_configuration="""global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/amp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := amp.NewScraper(ctx, "example", &amp.ScraperArgs{
    			Source: &amp.ScraperSourceArgs{
    				Vpc: &amp.ScraperSourceVpcArgs{
    					SecurityGroupIds: pulumi.StringArray{
    						exampleAwsSecurityGroup.Id,
    					},
    					SubnetIds: pulumi.StringArray{
    						example1.Id,
    						example2.Id,
    					},
    				},
    			},
    			Destination: &amp.ScraperDestinationArgs{
    				Amp: &amp.ScraperDestinationAmpArgs{
    					WorkspaceArn: pulumi.Any(exampleAwsPrometheusWorkspace.Arn),
    				},
    			},
    			Exporter: &amp.ScraperExporterArgs{
    				Opensearch: &amp.ScraperExporterOpensearchArgs{
    					DomainArn: pulumi.Any(exampleAwsOpensearchDomain.Arn),
    				},
    			},
    			ScrapeConfiguration: pulumi.String(`global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Amp.Scraper("example", new()
        {
            Source = new Aws.Amp.Inputs.ScraperSourceArgs
            {
                Vpc = new Aws.Amp.Inputs.ScraperSourceVpcArgs
                {
                    SecurityGroupIds = new[]
                    {
                        exampleAwsSecurityGroup.Id,
                    },
                    SubnetIds = new[]
                    {
                        example1.Id,
                        example2.Id,
                    },
                },
            },
            Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
            {
                Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
                {
                    WorkspaceArn = exampleAwsPrometheusWorkspace.Arn,
                },
            },
            Exporter = new Aws.Amp.Inputs.ScraperExporterArgs
            {
                Opensearch = new Aws.Amp.Inputs.ScraperExporterOpensearchArgs
                {
                    DomainArn = exampleAwsOpensearchDomain.Arn,
                },
            },
            ScrapeConfiguration = @"global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.Scraper;
    import com.pulumi.aws.amp.ScraperArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceVpcArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationAmpArgs;
    import com.pulumi.aws.amp.inputs.ScraperExporterArgs;
    import com.pulumi.aws.amp.inputs.ScraperExporterOpensearchArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Scraper("example", ScraperArgs.builder()
                .source(ScraperSourceArgs.builder()
                    .vpc(ScraperSourceVpcArgs.builder()
                        .securityGroupIds(exampleAwsSecurityGroup.id())
                        .subnetIds(                    
                            example1.id(),
                            example2.id())
                        .build())
                    .build())
                .destination(ScraperDestinationArgs.builder()
                    .amp(ScraperDestinationAmpArgs.builder()
                        .workspaceArn(exampleAwsPrometheusWorkspace.arn())
                        .build())
                    .build())
                .exporter(ScraperExporterArgs.builder()
                    .opensearch(ScraperExporterOpensearchArgs.builder()
                        .domainArn(exampleAwsOpensearchDomain.arn())
                        .build())
                    .build())
                .scrapeConfiguration("""
    global:
      scrape_interval: 30s
    scrape_configs:
      - job_name: 'my-service'
        dns_sd_configs:
          - names: ['my-service.my-namespace']
            type: A
            port: 8080
        metrics_path: '/metrics'
                """)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:amp:Scraper
        properties:
          source:
            vpc:
              securityGroupIds:
                - ${exampleAwsSecurityGroup.id}
              subnetIds:
                - ${example1.id}
                - ${example2.id}
          destination:
            amp:
              workspaceArn: ${exampleAwsPrometheusWorkspace.arn}
          exporter:
            opensearch:
              domainArn: ${exampleAwsOpensearchDomain.arn}
          scrapeConfiguration: |
            global:
              scrape_interval: 30s
            scrape_configs:
              - job_name: 'my-service'
                dns_sd_configs:
                  - names: ['my-service.my-namespace']
                    type: A
                    port: 8080
                metrics_path: '/metrics'
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_amp_scraper" "example" {
      source = {
        vpc = {
          security_group_ids = [exampleAwsSecurityGroup.id]
          subnet_ids         = [example1.id, example2.id]
        }
      }
      destination = {
        amp = {
          workspace_arn = exampleAwsPrometheusWorkspace.arn
        }
      }
      exporter = {
        opensearch = {
          domain_arn = exampleAwsOpensearchDomain.arn
        }
      }
      scrape_configuration = "global:\n  scrape_interval: 30s\nscrape_configs:\n  - job_name: 'my-service'\n    dns_sd_configs:\n      - names: ['my-service.my-namespace']\n        type: A\n        port: 8080\n    metrics_path: '/metrics'\n"
    }
    

    Use default EKS scraper configuration

    You can use the data source aws.amp.getDefaultScraperConfiguration to use a service managed scrape configuration.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.amp.getDefaultScraperConfiguration({});
    const exampleScraper = new aws.amp.Scraper("example", {
        destination: {
            amp: {
                workspaceArn: exampleAwsPrometheusWorkspace.arn,
            },
        },
        source: {
            eks: {
                clusterArn: exampleAwsEksCluster.arn,
                subnetIds: exampleAwsEksCluster.vpcConfig[0].subnetIds,
            },
        },
        scrapeConfiguration: example.then(example => example.configuration),
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.get_default_scraper_configuration()
    example_scraper = aws.amp.Scraper("example",
        destination={
            "amp": {
                "workspace_arn": example_aws_prometheus_workspace["arn"],
            },
        },
        source={
            "eks": {
                "cluster_arn": example_aws_eks_cluster["arn"],
                "subnet_ids": example_aws_eks_cluster["vpcConfig"][0]["subnetIds"],
            },
        },
        scrape_configuration=example.configuration)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/amp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := amp.GetDefaultScraperConfiguration(ctx, &amp.GetDefaultScraperConfigurationArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = amp.NewScraper(ctx, "example", &amp.ScraperArgs{
    			Destination: &amp.ScraperDestinationArgs{
    				Amp: &amp.ScraperDestinationAmpArgs{
    					WorkspaceArn: pulumi.Any(exampleAwsPrometheusWorkspace.Arn),
    				},
    			},
    			Source: &amp.ScraperSourceArgs{
    				Eks: &amp.ScraperSourceEksArgs{
    					ClusterArn: pulumi.Any(exampleAwsEksCluster.Arn),
    					SubnetIds:  pulumi.Any(exampleAwsEksCluster.VpcConfig[0].SubnetIds),
    				},
    			},
    			ScrapeConfiguration: pulumi.String(example.Configuration),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Amp.GetDefaultScraperConfiguration.Invoke();
    
        var exampleScraper = new Aws.Amp.Scraper("example", new()
        {
            Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
            {
                Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
                {
                    WorkspaceArn = exampleAwsPrometheusWorkspace.Arn,
                },
            },
            Source = new Aws.Amp.Inputs.ScraperSourceArgs
            {
                Eks = new Aws.Amp.Inputs.ScraperSourceEksArgs
                {
                    ClusterArn = exampleAwsEksCluster.Arn,
                    SubnetIds = exampleAwsEksCluster.VpcConfig[0].SubnetIds,
                },
            },
            ScrapeConfiguration = example.Apply(getDefaultScraperConfigurationResult => getDefaultScraperConfigurationResult.Configuration),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.AmpFunctions;
    import com.pulumi.aws.amp.inputs.GetDefaultScraperConfigurationArgs;
    import com.pulumi.aws.amp.Scraper;
    import com.pulumi.aws.amp.ScraperArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationAmpArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceEksArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = AmpFunctions.getDefaultScraperConfiguration(GetDefaultScraperConfigurationArgs.builder()
                .build());
    
            var exampleScraper = new Scraper("exampleScraper", ScraperArgs.builder()
                .destination(ScraperDestinationArgs.builder()
                    .amp(ScraperDestinationAmpArgs.builder()
                        .workspaceArn(exampleAwsPrometheusWorkspace.arn())
                        .build())
                    .build())
                .source(ScraperSourceArgs.builder()
                    .eks(ScraperSourceEksArgs.builder()
                        .clusterArn(exampleAwsEksCluster.arn())
                        .subnetIds(exampleAwsEksCluster.vpcConfig()[0].subnetIds())
                        .build())
                    .build())
                .scrapeConfiguration(example.configuration())
                .build());
    
        }
    }
    
    resources:
      exampleScraper:
        type: aws:amp:Scraper
        name: example
        properties:
          destination:
            amp:
              workspaceArn: ${exampleAwsPrometheusWorkspace.arn}
          source:
            eks:
              clusterArn: ${exampleAwsEksCluster.arn}
              subnetIds: ${exampleAwsEksCluster.vpcConfig[0].subnetIds}
          scrapeConfiguration: ${example.configuration}
    variables:
      example:
        fn::invoke:
          function: aws:amp:getDefaultScraperConfiguration
          arguments: {}
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    data "aws_amp_getdefaultscraperconfiguration" "example" {
    }
    
    resource "aws_amp_scraper" "example" {
      destination = {
        amp = {
          workspace_arn = exampleAwsPrometheusWorkspace.arn
        }
      }
      source = {
        eks = {
          cluster_arn = exampleAwsEksCluster.arn
          subnet_ids  = exampleAwsEksCluster.vpcConfig[0].subnetIds
        }
      }
      scrape_configuration = data.aws_amp_getdefaultscraperconfiguration.example.configuration
    }
    

    Ignoring changes to Prometheus Workspace destination

    A managed scraper will add a AMPAgentlessScraper tag to its Prometheus workspace destination. To avoid Terraform state forcing removing the tag from the workspace, you can add this tag to the destination workspace (preferred) or ignore tags changes with lifecycle. See example below.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const _this = aws.eks.getCluster({
        name: "example",
    });
    const example = new aws.amp.Workspace("example", {tags: {
        AMPAgentlessScraper: "",
    }});
    const exampleScraper = new aws.amp.Scraper("example", {
        source: {
            eks: {
                clusterArn: exampleAwsEksCluster.arn,
                subnetIds: exampleAwsEksCluster.vpcConfig[0].subnetIds,
            },
        },
        destination: {
            amp: {
                workspaceArn: example.arn,
            },
        },
        scrapeConfiguration: "...",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    this = aws.eks.get_cluster(name="example")
    example = aws.amp.Workspace("example", tags={
        "AMPAgentlessScraper": "",
    })
    example_scraper = aws.amp.Scraper("example",
        source={
            "eks": {
                "cluster_arn": example_aws_eks_cluster["arn"],
                "subnet_ids": example_aws_eks_cluster["vpcConfig"][0]["subnetIds"],
            },
        },
        destination={
            "amp": {
                "workspace_arn": example.arn,
            },
        },
        scrape_configuration="...")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/amp"
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/eks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eks.LookupCluster(ctx, &eks.LookupClusterArgs{
    			Name: "example",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		example, err := amp.NewWorkspace(ctx, "example", &amp.WorkspaceArgs{
    			Tags: pulumi.StringMap{
    				"AMPAgentlessScraper": pulumi.String(""),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = amp.NewScraper(ctx, "example", &amp.ScraperArgs{
    			Source: &amp.ScraperSourceArgs{
    				Eks: &amp.ScraperSourceEksArgs{
    					ClusterArn: pulumi.Any(exampleAwsEksCluster.Arn),
    					SubnetIds:  pulumi.Any(exampleAwsEksCluster.VpcConfig[0].SubnetIds),
    				},
    			},
    			Destination: &amp.ScraperDestinationArgs{
    				Amp: &amp.ScraperDestinationAmpArgs{
    					WorkspaceArn: example.Arn,
    				},
    			},
    			ScrapeConfiguration: pulumi.String("..."),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Aws.Eks.GetCluster.Invoke(new()
        {
            Name = "example",
        });
    
        var example = new Aws.Amp.Workspace("example", new()
        {
            Tags = 
            {
                { "AMPAgentlessScraper", "" },
            },
        });
    
        var exampleScraper = new Aws.Amp.Scraper("example", new()
        {
            Source = new Aws.Amp.Inputs.ScraperSourceArgs
            {
                Eks = new Aws.Amp.Inputs.ScraperSourceEksArgs
                {
                    ClusterArn = exampleAwsEksCluster.Arn,
                    SubnetIds = exampleAwsEksCluster.VpcConfig[0].SubnetIds,
                },
            },
            Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
            {
                Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
                {
                    WorkspaceArn = example.Arn,
                },
            },
            ScrapeConfiguration = "...",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.eks.EksFunctions;
    import com.pulumi.aws.eks.inputs.GetClusterArgs;
    import com.pulumi.aws.amp.Workspace;
    import com.pulumi.aws.amp.WorkspaceArgs;
    import com.pulumi.aws.amp.Scraper;
    import com.pulumi.aws.amp.ScraperArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceEksArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationAmpArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var this = EksFunctions.getCluster(GetClusterArgs.builder()
                .name("example")
                .build());
    
            var example = new Workspace("example", WorkspaceArgs.builder()
                .tags(Map.of("AMPAgentlessScraper", ""))
                .build());
    
            var exampleScraper = new Scraper("exampleScraper", ScraperArgs.builder()
                .source(ScraperSourceArgs.builder()
                    .eks(ScraperSourceEksArgs.builder()
                        .clusterArn(exampleAwsEksCluster.arn())
                        .subnetIds(exampleAwsEksCluster.vpcConfig()[0].subnetIds())
                        .build())
                    .build())
                .destination(ScraperDestinationArgs.builder()
                    .amp(ScraperDestinationAmpArgs.builder()
                        .workspaceArn(example.arn())
                        .build())
                    .build())
                .scrapeConfiguration("...")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:amp:Workspace
        properties:
          tags:
            AMPAgentlessScraper: ""
      exampleScraper:
        type: aws:amp:Scraper
        name: example
        properties:
          source:
            eks:
              clusterArn: ${exampleAwsEksCluster.arn}
              subnetIds: ${exampleAwsEksCluster.vpcConfig[0].subnetIds}
          destination:
            amp:
              workspaceArn: ${example.arn}
          scrapeConfiguration: '...'
    variables:
      this:
        fn::invoke:
          function: aws:eks:getCluster
          arguments:
            name: example
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    data "aws_eks_getcluster" "this" {
      name = "example"
    }
    
    resource "aws_amp_workspace" "example" {
      tags = {
        "AMPAgentlessScraper" = ""
      }
    }
    resource "aws_amp_scraper" "example" {
      source = {
        eks = {
          cluster_arn = exampleAwsEksCluster.arn
          subnet_ids  = exampleAwsEksCluster.vpcConfig[0].subnetIds
        }
      }
      destination = {
        amp = {
          workspace_arn = aws_amp_workspace.example.arn
        }
      }
      scrape_configuration = "..."
    }
    

    Configure aws-auth

    Your source Amazon EKS cluster must be configured to allow the scraper to access metrics. Follow the user guide to setup the appropriate Kubernetes permissions.

    Cross-Account Configuration

    This setup allows the scraper, running in a source account, to remote write its collected metrics to a workspace in a target account. Note that:

    • The target Role and target Workspace must be in the same account
    • The source Scraper and target Workspace must be in the same Region

    Follow the AWS Best Practices guide to learn about the IAM roles configuration and overall setup.

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.amp.Scraper("example", {
        source: {
            eks: {
                clusterArn: exampleAwsEksCluster.arn,
                subnetIds: exampleAwsEksCluster.vpcConfig[0].subnetIds,
            },
        },
        destination: {
            amp: {
                workspaceArn: "<target_account_workspace_arn>",
            },
        },
        roleConfiguration: {
            sourceRoleArn: source.arn,
            targetRoleArn: "arn:aws:iam::ACCOUNT-ID:role/target-role-name",
        },
        scrapeConfiguration: "...",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.Scraper("example",
        source={
            "eks": {
                "cluster_arn": example_aws_eks_cluster["arn"],
                "subnet_ids": example_aws_eks_cluster["vpcConfig"][0]["subnetIds"],
            },
        },
        destination={
            "amp": {
                "workspace_arn": "<target_account_workspace_arn>",
            },
        },
        role_configuration={
            "source_role_arn": source["arn"],
            "target_role_arn": "arn:aws:iam::ACCOUNT-ID:role/target-role-name",
        },
        scrape_configuration="...")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/amp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := amp.NewScraper(ctx, "example", &amp.ScraperArgs{
    			Source: &amp.ScraperSourceArgs{
    				Eks: &amp.ScraperSourceEksArgs{
    					ClusterArn: pulumi.Any(exampleAwsEksCluster.Arn),
    					SubnetIds:  pulumi.Any(exampleAwsEksCluster.VpcConfig[0].SubnetIds),
    				},
    			},
    			Destination: &amp.ScraperDestinationArgs{
    				Amp: &amp.ScraperDestinationAmpArgs{
    					WorkspaceArn: pulumi.String("<target_account_workspace_arn>"),
    				},
    			},
    			RoleConfiguration: &amp.ScraperRoleConfigurationArgs{
    				SourceRoleArn: pulumi.Any(source.Arn),
    				TargetRoleArn: pulumi.String("arn:aws:iam::ACCOUNT-ID:role/target-role-name"),
    			},
    			ScrapeConfiguration: pulumi.String("..."),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Amp.Scraper("example", new()
        {
            Source = new Aws.Amp.Inputs.ScraperSourceArgs
            {
                Eks = new Aws.Amp.Inputs.ScraperSourceEksArgs
                {
                    ClusterArn = exampleAwsEksCluster.Arn,
                    SubnetIds = exampleAwsEksCluster.VpcConfig[0].SubnetIds,
                },
            },
            Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
            {
                Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
                {
                    WorkspaceArn = "<target_account_workspace_arn>",
                },
            },
            RoleConfiguration = new Aws.Amp.Inputs.ScraperRoleConfigurationArgs
            {
                SourceRoleArn = source.Arn,
                TargetRoleArn = "arn:aws:iam::ACCOUNT-ID:role/target-role-name",
            },
            ScrapeConfiguration = "...",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.Scraper;
    import com.pulumi.aws.amp.ScraperArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceArgs;
    import com.pulumi.aws.amp.inputs.ScraperSourceEksArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperDestinationAmpArgs;
    import com.pulumi.aws.amp.inputs.ScraperRoleConfigurationArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Scraper("example", ScraperArgs.builder()
                .source(ScraperSourceArgs.builder()
                    .eks(ScraperSourceEksArgs.builder()
                        .clusterArn(exampleAwsEksCluster.arn())
                        .subnetIds(exampleAwsEksCluster.vpcConfig()[0].subnetIds())
                        .build())
                    .build())
                .destination(ScraperDestinationArgs.builder()
                    .amp(ScraperDestinationAmpArgs.builder()
                        .workspaceArn("<target_account_workspace_arn>")
                        .build())
                    .build())
                .roleConfiguration(ScraperRoleConfigurationArgs.builder()
                    .sourceRoleArn(source.arn())
                    .targetRoleArn("arn:aws:iam::ACCOUNT-ID:role/target-role-name")
                    .build())
                .scrapeConfiguration("...")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:amp:Scraper
        properties:
          source:
            eks:
              clusterArn: ${exampleAwsEksCluster.arn}
              subnetIds: ${exampleAwsEksCluster.vpcConfig[0].subnetIds}
          destination:
            amp:
              workspaceArn: <target_account_workspace_arn>
          roleConfiguration:
            sourceRoleArn: ${source.arn}
            targetRoleArn: arn:aws:iam::ACCOUNT-ID:role/target-role-name
          scrapeConfiguration: '...'
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_amp_scraper" "example" {
      source = {
        eks = {
          cluster_arn = exampleAwsEksCluster.arn
          subnet_ids  = exampleAwsEksCluster.vpcConfig[0].subnetIds
        }
      }
      destination = {
        amp = {
          workspace_arn = "<target_account_workspace_arn>"
        }
      }
      role_configuration = {
        source_role_arn = source.arn
        target_role_arn = "arn:aws:iam::ACCOUNT-ID:role/target-role-name"
      }
      scrape_configuration = "..."
    }
    

    Create Scraper Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Scraper(name: string, args: ScraperArgs, opts?: CustomResourceOptions);
    @overload
    def Scraper(resource_name: str,
                args: ScraperArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Scraper(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                destination: Optional[ScraperDestinationArgs] = None,
                scrape_configuration: Optional[str] = None,
                alias: Optional[str] = None,
                exporter: Optional[ScraperExporterArgs] = None,
                region: Optional[str] = None,
                role_configuration: Optional[ScraperRoleConfigurationArgs] = None,
                source: Optional[ScraperSourceArgs] = None,
                tags: Optional[Mapping[str, str]] = None,
                timeouts: Optional[ScraperTimeoutsArgs] = None)
    func NewScraper(ctx *Context, name string, args ScraperArgs, opts ...ResourceOption) (*Scraper, error)
    public Scraper(string name, ScraperArgs args, CustomResourceOptions? opts = null)
    public Scraper(String name, ScraperArgs args)
    public Scraper(String name, ScraperArgs args, CustomResourceOptions options)
    
    type: aws:amp:Scraper
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_amp_scraper" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ScraperArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ScraperArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ScraperArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScraperArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScraperArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var scraperResource = new Aws.Amp.Scraper("scraperResource", new()
    {
        Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
        {
            Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
            {
                WorkspaceArn = "string",
            },
            Cloudwatch = new Aws.Amp.Inputs.ScraperDestinationCloudwatchArgs
            {
                DatasetArn = "string",
            },
        },
        ScrapeConfiguration = "string",
        Alias = "string",
        Exporter = new Aws.Amp.Inputs.ScraperExporterArgs
        {
            Opensearch = new Aws.Amp.Inputs.ScraperExporterOpensearchArgs
            {
                DomainArn = "string",
            },
        },
        Region = "string",
        RoleConfiguration = new Aws.Amp.Inputs.ScraperRoleConfigurationArgs
        {
            SourceRoleArn = "string",
            TargetRoleArn = "string",
        },
        Source = new Aws.Amp.Inputs.ScraperSourceArgs
        {
            Eks = new Aws.Amp.Inputs.ScraperSourceEksArgs
            {
                ClusterArn = "string",
                SubnetIds = new[]
                {
                    "string",
                },
                SecurityGroupIds = new[]
                {
                    "string",
                },
            },
            Vpc = new Aws.Amp.Inputs.ScraperSourceVpcArgs
            {
                SecurityGroupIds = new[]
                {
                    "string",
                },
                SubnetIds = new[]
                {
                    "string",
                },
            },
        },
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.Amp.Inputs.ScraperTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := amp.NewScraper(ctx, "scraperResource", &amp.ScraperArgs{
    	Destination: &amp.ScraperDestinationArgs{
    		Amp: &amp.ScraperDestinationAmpArgs{
    			WorkspaceArn: pulumi.String("string"),
    		},
    		Cloudwatch: &amp.ScraperDestinationCloudwatchArgs{
    			DatasetArn: pulumi.String("string"),
    		},
    	},
    	ScrapeConfiguration: pulumi.String("string"),
    	Alias:               pulumi.String("string"),
    	Exporter: &amp.ScraperExporterArgs{
    		Opensearch: &amp.ScraperExporterOpensearchArgs{
    			DomainArn: pulumi.String("string"),
    		},
    	},
    	Region: pulumi.String("string"),
    	RoleConfiguration: &amp.ScraperRoleConfigurationArgs{
    		SourceRoleArn: pulumi.String("string"),
    		TargetRoleArn: pulumi.String("string"),
    	},
    	Source: &amp.ScraperSourceArgs{
    		Eks: &amp.ScraperSourceEksArgs{
    			ClusterArn: pulumi.String("string"),
    			SubnetIds: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			SecurityGroupIds: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    		Vpc: &amp.ScraperSourceVpcArgs{
    			SecurityGroupIds: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			SubnetIds: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &amp.ScraperTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    resource "aws_amp_scraper" "scraperResource" {
      lifecycle {
        create_before_destroy = true
      }
      destination = {
        amp = {
          workspace_arn = "string"
        }
        cloudwatch = {
          dataset_arn = "string"
        }
      }
      scrape_configuration = "string"
      alias                = "string"
      exporter = {
        opensearch = {
          domain_arn = "string"
        }
      }
      region = "string"
      role_configuration = {
        source_role_arn = "string"
        target_role_arn = "string"
      }
      source = {
        eks = {
          cluster_arn        = "string"
          subnet_ids         = ["string"]
          security_group_ids = ["string"]
        }
        vpc = {
          security_group_ids = ["string"]
          subnet_ids         = ["string"]
        }
      }
      tags = {
        "string" = "string"
      }
      timeouts = {
        create = "string"
        delete = "string"
        update = "string"
      }
    }
    
    var scraperResource = new Scraper("scraperResource", ScraperArgs.builder()
        .destination(ScraperDestinationArgs.builder()
            .amp(ScraperDestinationAmpArgs.builder()
                .workspaceArn("string")
                .build())
            .cloudwatch(ScraperDestinationCloudwatchArgs.builder()
                .datasetArn("string")
                .build())
            .build())
        .scrapeConfiguration("string")
        .alias("string")
        .exporter(ScraperExporterArgs.builder()
            .opensearch(ScraperExporterOpensearchArgs.builder()
                .domainArn("string")
                .build())
            .build())
        .region("string")
        .roleConfiguration(ScraperRoleConfigurationArgs.builder()
            .sourceRoleArn("string")
            .targetRoleArn("string")
            .build())
        .source(ScraperSourceArgs.builder()
            .eks(ScraperSourceEksArgs.builder()
                .clusterArn("string")
                .subnetIds("string")
                .securityGroupIds("string")
                .build())
            .vpc(ScraperSourceVpcArgs.builder()
                .securityGroupIds("string")
                .subnetIds("string")
                .build())
            .build())
        .tags(Map.of("string", "string"))
        .timeouts(ScraperTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    scraper_resource = aws.amp.Scraper("scraperResource",
        destination={
            "amp": {
                "workspace_arn": "string",
            },
            "cloudwatch": {
                "dataset_arn": "string",
            },
        },
        scrape_configuration="string",
        alias="string",
        exporter={
            "opensearch": {
                "domain_arn": "string",
            },
        },
        region="string",
        role_configuration={
            "source_role_arn": "string",
            "target_role_arn": "string",
        },
        source={
            "eks": {
                "cluster_arn": "string",
                "subnet_ids": ["string"],
                "security_group_ids": ["string"],
            },
            "vpc": {
                "security_group_ids": ["string"],
                "subnet_ids": ["string"],
            },
        },
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const scraperResource = new aws.amp.Scraper("scraperResource", {
        destination: {
            amp: {
                workspaceArn: "string",
            },
            cloudwatch: {
                datasetArn: "string",
            },
        },
        scrapeConfiguration: "string",
        alias: "string",
        exporter: {
            opensearch: {
                domainArn: "string",
            },
        },
        region: "string",
        roleConfiguration: {
            sourceRoleArn: "string",
            targetRoleArn: "string",
        },
        source: {
            eks: {
                clusterArn: "string",
                subnetIds: ["string"],
                securityGroupIds: ["string"],
            },
            vpc: {
                securityGroupIds: ["string"],
                subnetIds: ["string"],
            },
        },
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: aws:amp:Scraper
    properties:
        alias: string
        destination:
            amp:
                workspaceArn: string
            cloudwatch:
                datasetArn: string
        exporter:
            opensearch:
                domainArn: string
        region: string
        roleConfiguration:
            sourceRoleArn: string
            targetRoleArn: string
        scrapeConfiguration: string
        source:
            eks:
                clusterArn: string
                securityGroupIds:
                    - string
                subnetIds:
                    - string
            vpc:
                securityGroupIds:
                    - string
                subnetIds:
                    - string
        tags:
            string: string
        timeouts:
            create: string
            delete: string
            update: string
    

    Scraper Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Scraper resource accepts the following input properties:

    Destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    ScrapeConfiguration string
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    Alias string
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    Exporter ScraperExporter
    Configuration block for additional exporters. See exporter Block for details.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoleConfiguration ScraperRoleConfiguration
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    Source ScraperSource

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    Tags Dictionary<string, string>
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ScraperTimeouts
    Destination ScraperDestinationArgs
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    ScrapeConfiguration string
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    Alias string
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    Exporter ScraperExporterArgs
    Configuration block for additional exporters. See exporter Block for details.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoleConfiguration ScraperRoleConfigurationArgs
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    Source ScraperSourceArgs

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    Tags map[string]string
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ScraperTimeoutsArgs
    destination object
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    scrape_configuration string
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias string
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    exporter object
    Configuration block for additional exporters. See exporter Block for details.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    role_configuration object
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    source object

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags map(string)
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts object
    destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    scrapeConfiguration String
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias String
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    exporter ScraperExporter
    Configuration block for additional exporters. See exporter Block for details.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleConfiguration ScraperRoleConfiguration
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    source ScraperSource

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags Map<String,String>
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ScraperTimeouts
    destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    scrapeConfiguration string
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias string
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    exporter ScraperExporter
    Configuration block for additional exporters. See exporter Block for details.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleConfiguration ScraperRoleConfiguration
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    source ScraperSource

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags {[key: string]: string}
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ScraperTimeouts
    destination ScraperDestinationArgs
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    scrape_configuration str
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias str
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    exporter ScraperExporterArgs
    Configuration block for additional exporters. See exporter Block for details.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    role_configuration ScraperRoleConfigurationArgs
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    source ScraperSourceArgs

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags Mapping[str, str]
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ScraperTimeoutsArgs
    destination Property Map
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    scrapeConfiguration String
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias String
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    exporter Property Map
    Configuration block for additional exporters. See exporter Block for details.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleConfiguration Property Map
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    source Property Map

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags Map<String>
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Scraper resource produces the following output properties:

    Arn string
    ARN of the scraper.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleArn string
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Arn string
    ARN of the scraper.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleArn string
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn string
    ARN of the scraper.
    id string
    The provider-assigned unique ID for this managed resource.
    role_arn string
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tags_all map(string)
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn String
    ARN of the scraper.
    id String
    The provider-assigned unique ID for this managed resource.
    roleArn String
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn string
    ARN of the scraper.
    id string
    The provider-assigned unique ID for this managed resource.
    roleArn string
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn str
    ARN of the scraper.
    id str
    The provider-assigned unique ID for this managed resource.
    role_arn str
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    arn String
    ARN of the scraper.
    id String
    The provider-assigned unique ID for this managed resource.
    roleArn String
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

    Look up Existing Scraper Resource

    Get an existing Scraper resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ScraperState, opts?: CustomResourceOptions): Scraper
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alias: Optional[str] = None,
            arn: Optional[str] = None,
            destination: Optional[ScraperDestinationArgs] = None,
            exporter: Optional[ScraperExporterArgs] = None,
            region: Optional[str] = None,
            role_arn: Optional[str] = None,
            role_configuration: Optional[ScraperRoleConfigurationArgs] = None,
            scrape_configuration: Optional[str] = None,
            source: Optional[ScraperSourceArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[ScraperTimeoutsArgs] = None) -> Scraper
    func GetScraper(ctx *Context, name string, id IDInput, state *ScraperState, opts ...ResourceOption) (*Scraper, error)
    public static Scraper Get(string name, Input<string> id, ScraperState? state, CustomResourceOptions? opts = null)
    public static Scraper get(String name, Output<String> id, ScraperState state, CustomResourceOptions options)
    resources:  _:    type: aws:amp:Scraper    get:      id: ${id}
    import {
      to = aws_amp_scraper.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Alias string
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    Arn string
    ARN of the scraper.
    Destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    Exporter ScraperExporter
    Configuration block for additional exporters. See exporter Block for details.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoleArn string
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    RoleConfiguration ScraperRoleConfiguration
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    ScrapeConfiguration string
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    Source ScraperSource

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    Tags Dictionary<string, string>
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Timeouts ScraperTimeouts
    Alias string
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    Arn string
    ARN of the scraper.
    Destination ScraperDestinationArgs
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    Exporter ScraperExporterArgs
    Configuration block for additional exporters. See exporter Block for details.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    RoleArn string
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    RoleConfiguration ScraperRoleConfigurationArgs
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    ScrapeConfiguration string
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    Source ScraperSourceArgs

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    Tags map[string]string
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    Timeouts ScraperTimeoutsArgs
    alias string
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn string
    ARN of the scraper.
    destination object
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    exporter object
    Configuration block for additional exporters. See exporter Block for details.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    role_arn string
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    role_configuration object
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    scrape_configuration string
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    source object

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags map(string)
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all map(string)
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts object
    alias String
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn String
    ARN of the scraper.
    destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    exporter ScraperExporter
    Configuration block for additional exporters. See exporter Block for details.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn String
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    roleConfiguration ScraperRoleConfiguration
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    scrapeConfiguration String
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    source ScraperSource

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags Map<String,String>
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ScraperTimeouts
    alias string
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn string
    ARN of the scraper.
    destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    exporter ScraperExporter
    Configuration block for additional exporters. See exporter Block for details.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn string
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    roleConfiguration ScraperRoleConfiguration
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    scrapeConfiguration string
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    source ScraperSource

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags {[key: string]: string}
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ScraperTimeouts
    alias str
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn str
    ARN of the scraper.
    destination ScraperDestinationArgs
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    exporter ScraperExporterArgs
    Configuration block for additional exporters. See exporter Block for details.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    role_arn str
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    role_configuration ScraperRoleConfigurationArgs
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    scrape_configuration str
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    source ScraperSourceArgs

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags Mapping[str, str]
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts ScraperTimeoutsArgs
    alias String
    Name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn String
    ARN of the scraper.
    destination Property Map
    Configuration block for the managed scraper to send metrics to. See destination Block for details.
    exporter Property Map
    Configuration block for additional exporters. See exporter Block for details.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    roleArn String
    ARN of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    roleConfiguration Property Map
    Configuration block to enable writing to an Amazon Managed Service for Prometheus workspace in a different account. See roleConfiguration Block for details.
    scrapeConfiguration String
    Configuration file to use in the new scraper. For more information, see Scraper configuration.
    source Property Map

    Configuration block to specify where the managed scraper will collect metrics from. See source Block for details.

    The following arguments are optional:

    tags Map<String>
    Map of tags to assign to the resource. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
    timeouts Property Map

    Supporting Types

    ScraperDestination, ScraperDestinationArgs

    Amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp Block for details.
    Cloudwatch ScraperDestinationCloudwatch

    Configuration block for a CloudWatch Metrics destination. See cloudwatch Block for details.

    NOTE: Either amp or cloudwatch must be specified, but not both.

    Amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp Block for details.
    Cloudwatch ScraperDestinationCloudwatch

    Configuration block for a CloudWatch Metrics destination. See cloudwatch Block for details.

    NOTE: Either amp or cloudwatch must be specified, but not both.

    amp object
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp Block for details.
    cloudwatch object

    Configuration block for a CloudWatch Metrics destination. See cloudwatch Block for details.

    NOTE: Either amp or cloudwatch must be specified, but not both.

    amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp Block for details.
    cloudwatch ScraperDestinationCloudwatch

    Configuration block for a CloudWatch Metrics destination. See cloudwatch Block for details.

    NOTE: Either amp or cloudwatch must be specified, but not both.

    amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp Block for details.
    cloudwatch ScraperDestinationCloudwatch

    Configuration block for a CloudWatch Metrics destination. See cloudwatch Block for details.

    NOTE: Either amp or cloudwatch must be specified, but not both.

    amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp Block for details.
    cloudwatch ScraperDestinationCloudwatch

    Configuration block for a CloudWatch Metrics destination. See cloudwatch Block for details.

    NOTE: Either amp or cloudwatch must be specified, but not both.

    amp Property Map
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp Block for details.
    cloudwatch Property Map

    Configuration block for a CloudWatch Metrics destination. See cloudwatch Block for details.

    NOTE: Either amp or cloudwatch must be specified, but not both.

    ScraperDestinationAmp, ScraperDestinationAmpArgs

    WorkspaceArn string
    ARN of the prometheus workspace.
    WorkspaceArn string
    ARN of the prometheus workspace.
    workspace_arn string
    ARN of the prometheus workspace.
    workspaceArn String
    ARN of the prometheus workspace.
    workspaceArn string
    ARN of the prometheus workspace.
    workspace_arn str
    ARN of the prometheus workspace.
    workspaceArn String
    ARN of the prometheus workspace.

    ScraperDestinationCloudwatch, ScraperDestinationCloudwatchArgs

    DatasetArn string
    ARN of the CloudWatch dataset. Use arn:aws:cloudwatch:{region}:{account}:dataset/default for the default dataset.
    DatasetArn string
    ARN of the CloudWatch dataset. Use arn:aws:cloudwatch:{region}:{account}:dataset/default for the default dataset.
    dataset_arn string
    ARN of the CloudWatch dataset. Use arn:aws:cloudwatch:{region}:{account}:dataset/default for the default dataset.
    datasetArn String
    ARN of the CloudWatch dataset. Use arn:aws:cloudwatch:{region}:{account}:dataset/default for the default dataset.
    datasetArn string
    ARN of the CloudWatch dataset. Use arn:aws:cloudwatch:{region}:{account}:dataset/default for the default dataset.
    dataset_arn str
    ARN of the CloudWatch dataset. Use arn:aws:cloudwatch:{region}:{account}:dataset/default for the default dataset.
    datasetArn String
    ARN of the CloudWatch dataset. Use arn:aws:cloudwatch:{region}:{account}:dataset/default for the default dataset.

    ScraperExporter, ScraperExporterArgs

    Opensearch ScraperExporterOpensearch
    Configuration block for an OpenSearch exporter. See opensearch Block for details.
    Opensearch ScraperExporterOpensearch
    Configuration block for an OpenSearch exporter. See opensearch Block for details.
    opensearch object
    Configuration block for an OpenSearch exporter. See opensearch Block for details.
    opensearch ScraperExporterOpensearch
    Configuration block for an OpenSearch exporter. See opensearch Block for details.
    opensearch ScraperExporterOpensearch
    Configuration block for an OpenSearch exporter. See opensearch Block for details.
    opensearch ScraperExporterOpensearch
    Configuration block for an OpenSearch exporter. See opensearch Block for details.
    opensearch Property Map
    Configuration block for an OpenSearch exporter. See opensearch Block for details.

    ScraperExporterOpensearch, ScraperExporterOpensearchArgs

    DomainArn string
    ARN of the OpenSearch domain.
    DomainArn string
    ARN of the OpenSearch domain.
    domain_arn string
    ARN of the OpenSearch domain.
    domainArn String
    ARN of the OpenSearch domain.
    domainArn string
    ARN of the OpenSearch domain.
    domain_arn str
    ARN of the OpenSearch domain.
    domainArn String
    ARN of the OpenSearch domain.

    ScraperRoleConfiguration, ScraperRoleConfigurationArgs

    SourceRoleArn string
    ARN of the source role configuration. Must be an IAM role ARN.
    TargetRoleArn string
    ARN of the target role configuration. Must be an IAM role ARN.
    SourceRoleArn string
    ARN of the source role configuration. Must be an IAM role ARN.
    TargetRoleArn string
    ARN of the target role configuration. Must be an IAM role ARN.
    source_role_arn string
    ARN of the source role configuration. Must be an IAM role ARN.
    target_role_arn string
    ARN of the target role configuration. Must be an IAM role ARN.
    sourceRoleArn String
    ARN of the source role configuration. Must be an IAM role ARN.
    targetRoleArn String
    ARN of the target role configuration. Must be an IAM role ARN.
    sourceRoleArn string
    ARN of the source role configuration. Must be an IAM role ARN.
    targetRoleArn string
    ARN of the target role configuration. Must be an IAM role ARN.
    source_role_arn str
    ARN of the source role configuration. Must be an IAM role ARN.
    target_role_arn str
    ARN of the target role configuration. Must be an IAM role ARN.
    sourceRoleArn String
    ARN of the source role configuration. Must be an IAM role ARN.
    targetRoleArn String
    ARN of the target role configuration. Must be an IAM role ARN.

    ScraperSource, ScraperSourceArgs

    Eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks Block for details.
    Vpc ScraperSourceVpc

    Configuration block for a VPC source. See vpc Block for details.

    NOTE: Either eks or vpc must be specified, but not both.

    Eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks Block for details.
    Vpc ScraperSourceVpc

    Configuration block for a VPC source. See vpc Block for details.

    NOTE: Either eks or vpc must be specified, but not both.

    eks object
    Configuration block for an EKS cluster source. See eks Block for details.
    vpc object

    Configuration block for a VPC source. See vpc Block for details.

    NOTE: Either eks or vpc must be specified, but not both.

    eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks Block for details.
    vpc ScraperSourceVpc

    Configuration block for a VPC source. See vpc Block for details.

    NOTE: Either eks or vpc must be specified, but not both.

    eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks Block for details.
    vpc ScraperSourceVpc

    Configuration block for a VPC source. See vpc Block for details.

    NOTE: Either eks or vpc must be specified, but not both.

    eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks Block for details.
    vpc ScraperSourceVpc

    Configuration block for a VPC source. See vpc Block for details.

    NOTE: Either eks or vpc must be specified, but not both.

    eks Property Map
    Configuration block for an EKS cluster source. See eks Block for details.
    vpc Property Map

    Configuration block for a VPC source. See vpc Block for details.

    NOTE: Either eks or vpc must be specified, but not both.

    ScraperSourceEks, ScraperSourceEksArgs

    ClusterArn string
    ARN of the source EKS cluster.
    SubnetIds List<string>
    List of subnet IDs. Must be in at least two different availability zones.
    SecurityGroupIds List<string>
    List of the security group IDs for the Amazon EKS cluster VPC configuration.
    ClusterArn string
    ARN of the source EKS cluster.
    SubnetIds []string
    List of subnet IDs. Must be in at least two different availability zones.
    SecurityGroupIds []string
    List of the security group IDs for the Amazon EKS cluster VPC configuration.
    cluster_arn string
    ARN of the source EKS cluster.
    subnet_ids list(string)
    List of subnet IDs. Must be in at least two different availability zones.
    security_group_ids list(string)
    List of the security group IDs for the Amazon EKS cluster VPC configuration.
    clusterArn String
    ARN of the source EKS cluster.
    subnetIds List<String>
    List of subnet IDs. Must be in at least two different availability zones.
    securityGroupIds List<String>
    List of the security group IDs for the Amazon EKS cluster VPC configuration.
    clusterArn string
    ARN of the source EKS cluster.
    subnetIds string[]
    List of subnet IDs. Must be in at least two different availability zones.
    securityGroupIds string[]
    List of the security group IDs for the Amazon EKS cluster VPC configuration.
    cluster_arn str
    ARN of the source EKS cluster.
    subnet_ids Sequence[str]
    List of subnet IDs. Must be in at least two different availability zones.
    security_group_ids Sequence[str]
    List of the security group IDs for the Amazon EKS cluster VPC configuration.
    clusterArn String
    ARN of the source EKS cluster.
    subnetIds List<String>
    List of subnet IDs. Must be in at least two different availability zones.
    securityGroupIds List<String>
    List of the security group IDs for the Amazon EKS cluster VPC configuration.

    ScraperSourceVpc, ScraperSourceVpcArgs

    SecurityGroupIds List<string>
    List of security group IDs for the VPC configuration.
    SubnetIds List<string>
    List of subnet IDs. Must be in at least two different availability zones.
    SecurityGroupIds []string
    List of security group IDs for the VPC configuration.
    SubnetIds []string
    List of subnet IDs. Must be in at least two different availability zones.
    security_group_ids list(string)
    List of security group IDs for the VPC configuration.
    subnet_ids list(string)
    List of subnet IDs. Must be in at least two different availability zones.
    securityGroupIds List<String>
    List of security group IDs for the VPC configuration.
    subnetIds List<String>
    List of subnet IDs. Must be in at least two different availability zones.
    securityGroupIds string[]
    List of security group IDs for the VPC configuration.
    subnetIds string[]
    List of subnet IDs. Must be in at least two different availability zones.
    security_group_ids Sequence[str]
    List of security group IDs for the VPC configuration.
    subnet_ids Sequence[str]
    List of subnet IDs. Must be in at least two different availability zones.
    securityGroupIds List<String>
    List of security group IDs for the VPC configuration.
    subnetIds List<String>
    List of subnet IDs. Must be in at least two different availability zones.

    ScraperTimeouts, ScraperTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    Identity Schema

    Required

    • id (String) ID of the scraper.

    Optional

    • accountId (String) AWS Account where this resource is managed.
    • region (String) Region where this resource is managed.

    Using pulumi import, import scrapers using id. For example:

    $ pulumi import aws:amp/scraper:Scraper example s-b6f487db-4761-4930-9215-e9d588a7efe2
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo aws logo
    Viewing docs for AWS v7.48.0
    published on Tuesday, Sep 22, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial