1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. amp
  6. ScraperLoggingConfiguration
Viewing docs for AWS v7.46.0
published on Thursday, Sep 10, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.46.0
published on Thursday, Sep 10, 2026 by Pulumi

    Manages an Amazon Managed Service for Prometheus (AMP) Scraper Logging Configuration.

    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: exampleAwsSubnet.map(__item => __item.id),
            },
        },
        destination: {
            amp: {
                workspaceArn: exampleAwsPrometheusWorkspace.arn,
            },
        },
        scrapeConfiguration: `global:
      scrape_interval: 15s
    scrape_configs:
      - job_name: 'prometheus'
        static_configs:
          - targets: ['localhost:9090']
    `,
    });
    const exampleLogGroup = new aws.cloudwatch.LogGroup("example", {name: "/aws/prometheus/scraper-logs/example"});
    const exampleScraperLoggingConfiguration = new aws.amp.ScraperLoggingConfiguration("example", {
        loggingDestination: {
            cloudwatchLogs: {
                logGroupArn: pulumi.interpolate`${exampleLogGroup.arn}:*`,
            },
        },
        scraperId: example.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.Scraper("example",
        source={
            "eks": {
                "cluster_arn": example_aws_eks_cluster["arn"],
                "subnet_ids": [__item["id"] for __item in example_aws_subnet],
            },
        },
        destination={
            "amp": {
                "workspace_arn": example_aws_prometheus_workspace["arn"],
            },
        },
        scrape_configuration="""global:
      scrape_interval: 15s
    scrape_configs:
      - job_name: 'prometheus'
        static_configs:
          - targets: ['localhost:9090']
    """)
    example_log_group = aws.cloudwatch.LogGroup("example", name="/aws/prometheus/scraper-logs/example")
    example_scraper_logging_configuration = aws.amp.ScraperLoggingConfiguration("example",
        logging_destination={
            "cloudwatch_logs": {
                "log_group_arn": example_log_group.arn.apply(lambda arn: f"{arn}:*"),
            },
        },
        scraper_id=example.id)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/amp"
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cloudwatch"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    example, err := amp.NewScraper(ctx, "example", &amp.ScraperArgs{
    Source: &amp.ScraperSourceArgs{
    Eks: &amp.ScraperSourceEksArgs{
    ClusterArn: pulumi.Any(exampleAwsEksCluster.Arn),
    SubnetIds: pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:4,20-42)),
    },
    },
    Destination: &amp.ScraperDestinationArgs{
    Amp: &amp.ScraperDestinationAmpArgs{
    WorkspaceArn: pulumi.Any(exampleAwsPrometheusWorkspace.Arn),
    },
    },
    ScrapeConfiguration: pulumi.String(`global:
      scrape_interval: 15s
    scrape_configs:
      - job_name: 'prometheus'
        static_configs:
          - targets: ['localhost:9090']
    `),
    })
    if err != nil {
    return err
    }
    exampleLogGroup, err := cloudwatch.NewLogGroup(ctx, "example", &cloudwatch.LogGroupArgs{
    Name: pulumi.String("/aws/prometheus/scraper-logs/example"),
    })
    if err != nil {
    return err
    }
    _, err = amp.NewScraperLoggingConfiguration(ctx, "example", &amp.ScraperLoggingConfigurationArgs{
    LoggingDestination: &amp.ScraperLoggingConfigurationLoggingDestinationArgs{
    CloudwatchLogs: &amp.ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs{
    LogGroupArn: exampleLogGroup.Arn.ApplyT(func(arn string) (string, error) {
    return fmt.Sprintf("%v:*", arn), nil
    }).(pulumi.StringOutput),
    },
    },
    ScraperId: example.ID().ToIDOutput().ToStringOutput(),
    })
    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 = exampleAwsSubnet.Select(__item => __item.Id).ToList(),
                },
            },
            Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
            {
                Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
                {
                    WorkspaceArn = exampleAwsPrometheusWorkspace.Arn,
                },
            },
            ScrapeConfiguration = @"global:
      scrape_interval: 15s
    scrape_configs:
      - job_name: 'prometheus'
        static_configs:
          - targets: ['localhost:9090']
    ",
        });
    
        var exampleLogGroup = new Aws.CloudWatch.LogGroup("example", new()
        {
            Name = "/aws/prometheus/scraper-logs/example",
        });
    
        var exampleScraperLoggingConfiguration = new Aws.Amp.ScraperLoggingConfiguration("example", new()
        {
            LoggingDestination = new Aws.Amp.Inputs.ScraperLoggingConfigurationLoggingDestinationArgs
            {
                CloudwatchLogs = new Aws.Amp.Inputs.ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs
                {
                    LogGroupArn = exampleLogGroup.Arn.Apply(arn => $"{arn}:*"),
                },
            },
            ScraperId = example.Id,
        });
    
    });
    
    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.cloudwatch.LogGroup;
    import com.pulumi.aws.cloudwatch.LogGroupArgs;
    import com.pulumi.aws.amp.ScraperLoggingConfiguration;
    import com.pulumi.aws.amp.ScraperLoggingConfigurationArgs;
    import com.pulumi.aws.amp.inputs.ScraperLoggingConfigurationLoggingDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs;
    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(exampleAwsSubnet.stream().map(element -> element.id()).collect(toList()))
                        .build())
                    .build())
                .destination(ScraperDestinationArgs.builder()
                    .amp(ScraperDestinationAmpArgs.builder()
                        .workspaceArn(exampleAwsPrometheusWorkspace.arn())
                        .build())
                    .build())
                .scrapeConfiguration("""
    global:
      scrape_interval: 15s
    scrape_configs:
      - job_name: 'prometheus'
        static_configs:
          - targets: ['localhost:9090']
                """)
                .build());
    
            var exampleLogGroup = new LogGroup("exampleLogGroup", LogGroupArgs.builder()
                .name("/aws/prometheus/scraper-logs/example")
                .build());
    
            var exampleScraperLoggingConfiguration = new ScraperLoggingConfiguration("exampleScraperLoggingConfiguration", ScraperLoggingConfigurationArgs.builder()
                .loggingDestination(ScraperLoggingConfigurationLoggingDestinationArgs.builder()
                    .cloudwatchLogs(ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs.builder()
                        .logGroupArn(exampleLogGroup.arn().applyValue(_arn -> String.format("%s:*", _arn)))
                        .build())
                    .build())
                .scraperId(example.id())
                .build());
    
        }
    }
    
    Example coming soon!
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_amp_scraper" "example" {
      source = {
        eks = {
          cluster_arn = exampleAwsEksCluster.arn
          subnet_ids  = exampleAwsSubnet[*].id
        }
      }
      destination = {
        amp = {
          workspace_arn = exampleAwsPrometheusWorkspace.arn
        }
      }
      scrape_configuration = "global:\n  scrape_interval: 15s\nscrape_configs:\n  - job_name: 'prometheus'\n    static_configs:\n      - targets: ['localhost:9090']\n"
    }
    resource "aws_cloudwatch_loggroup" "example" {
      name = "/aws/prometheus/scraper-logs/example"
    }
    resource "aws_amp_scraperloggingconfiguration" "example" {
      logging_destination = {
        cloudwatch_logs = {
          log_group_arn ="${aws_cloudwatch_loggroup.example.arn}:*"
        }
      }
      scraper_id = aws_amp_scraper.example.id
    }
    

    With Scraper Components

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.amp.ScraperLoggingConfiguration("example", {
        loggingDestination: {
            cloudwatchLogs: {
                logGroupArn: `${exampleAwsCloudwatchLogGroup.arn}:*`,
            },
        },
        scraperId: exampleAwsPrometheusScraper.id,
        scraperComponents: [
            "COLLECTOR",
            "EXPORTER",
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.amp.ScraperLoggingConfiguration("example",
        logging_destination={
            "cloudwatch_logs": {
                "log_group_arn": f"{example_aws_cloudwatch_log_group['arn']}:*",
            },
        },
        scraper_id=example_aws_prometheus_scraper["id"],
        scraper_components=[
            "COLLECTOR",
            "EXPORTER",
        ])
    
    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.NewScraperLoggingConfiguration(ctx, "example", &amp.ScraperLoggingConfigurationArgs{
    			LoggingDestination: &amp.ScraperLoggingConfigurationLoggingDestinationArgs{
    				CloudwatchLogs: &amp.ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs{
    					LogGroupArn: pulumi.Sprintf("%v:*", exampleAwsCloudwatchLogGroup.Arn),
    				},
    			},
    			ScraperId: pulumi.Any(exampleAwsPrometheusScraper.Id),
    			ScraperComponents: pulumi.StringArray{
    				pulumi.String("COLLECTOR"),
    				pulumi.String("EXPORTER"),
    			},
    		})
    		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.ScraperLoggingConfiguration("example", new()
        {
            LoggingDestination = new Aws.Amp.Inputs.ScraperLoggingConfigurationLoggingDestinationArgs
            {
                CloudwatchLogs = new Aws.Amp.Inputs.ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs
                {
                    LogGroupArn = $"{exampleAwsCloudwatchLogGroup.Arn}:*",
                },
            },
            ScraperId = exampleAwsPrometheusScraper.Id,
            ScraperComponents = new[]
            {
                "COLLECTOR",
                "EXPORTER",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.amp.ScraperLoggingConfiguration;
    import com.pulumi.aws.amp.ScraperLoggingConfigurationArgs;
    import com.pulumi.aws.amp.inputs.ScraperLoggingConfigurationLoggingDestinationArgs;
    import com.pulumi.aws.amp.inputs.ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs;
    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 ScraperLoggingConfiguration("example", ScraperLoggingConfigurationArgs.builder()
                .loggingDestination(ScraperLoggingConfigurationLoggingDestinationArgs.builder()
                    .cloudwatchLogs(ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs.builder()
                        .logGroupArn(String.format("%s:*", exampleAwsCloudwatchLogGroup.arn()))
                        .build())
                    .build())
                .scraperId(exampleAwsPrometheusScraper.id())
                .scraperComponents(            
                    "COLLECTOR",
                    "EXPORTER")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:amp:ScraperLoggingConfiguration
        properties:
          loggingDestination:
            cloudwatchLogs:
              logGroupArn: ${exampleAwsCloudwatchLogGroup.arn}:*
          scraperId: ${exampleAwsPrometheusScraper.id}
          scraperComponents:
            - COLLECTOR
            - EXPORTER
    
    pulumi {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_amp_scraperloggingconfiguration" "example" {
      logging_destination = {
        cloudwatch_logs = {
          log_group_arn ="${exampleAwsCloudwatchLogGroup.arn}:*"
        }
      }
      scraper_id         = exampleAwsPrometheusScraper.id
      scraper_components = ["COLLECTOR", "EXPORTER"]
    }
    

    Create ScraperLoggingConfiguration Resource

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

    Constructor syntax

    new ScraperLoggingConfiguration(name: string, args: ScraperLoggingConfigurationArgs, opts?: CustomResourceOptions);
    @overload
    def ScraperLoggingConfiguration(resource_name: str,
                                    args: ScraperLoggingConfigurationArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScraperLoggingConfiguration(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    logging_destination: Optional[ScraperLoggingConfigurationLoggingDestinationArgs] = None,
                                    scraper_id: Optional[str] = None,
                                    region: Optional[str] = None,
                                    scraper_components: Optional[Sequence[str]] = None,
                                    timeouts: Optional[ScraperLoggingConfigurationTimeoutsArgs] = None)
    func NewScraperLoggingConfiguration(ctx *Context, name string, args ScraperLoggingConfigurationArgs, opts ...ResourceOption) (*ScraperLoggingConfiguration, error)
    public ScraperLoggingConfiguration(string name, ScraperLoggingConfigurationArgs args, CustomResourceOptions? opts = null)
    public ScraperLoggingConfiguration(String name, ScraperLoggingConfigurationArgs args)
    public ScraperLoggingConfiguration(String name, ScraperLoggingConfigurationArgs args, CustomResourceOptions options)
    
    type: aws:amp:ScraperLoggingConfiguration
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_amp_scraper_logging_configuration" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ScraperLoggingConfigurationArgs
    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 ScraperLoggingConfigurationArgs
    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 ScraperLoggingConfigurationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScraperLoggingConfigurationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScraperLoggingConfigurationArgs
    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 scraperLoggingConfigurationResource = new Aws.Amp.ScraperLoggingConfiguration("scraperLoggingConfigurationResource", new()
    {
        LoggingDestination = new Aws.Amp.Inputs.ScraperLoggingConfigurationLoggingDestinationArgs
        {
            CloudwatchLogs = new Aws.Amp.Inputs.ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs
            {
                LogGroupArn = "string",
            },
        },
        ScraperId = "string",
        Region = "string",
        ScraperComponents = new[]
        {
            "string",
        },
        Timeouts = new Aws.Amp.Inputs.ScraperLoggingConfigurationTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := amp.NewScraperLoggingConfiguration(ctx, "scraperLoggingConfigurationResource", &amp.ScraperLoggingConfigurationArgs{
    	LoggingDestination: &amp.ScraperLoggingConfigurationLoggingDestinationArgs{
    		CloudwatchLogs: &amp.ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs{
    			LogGroupArn: pulumi.String("string"),
    		},
    	},
    	ScraperId: pulumi.String("string"),
    	Region:    pulumi.String("string"),
    	ScraperComponents: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &amp.ScraperLoggingConfigurationTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    resource "aws_amp_scraper_logging_configuration" "scraperLoggingConfigurationResource" {
      lifecycle {
        create_before_destroy = true
      }
      logging_destination = {
        cloudwatch_logs = {
          log_group_arn = "string"
        }
      }
      scraper_id         = "string"
      region             = "string"
      scraper_components = ["string"]
      timeouts = {
        create = "string"
        delete = "string"
        update = "string"
      }
    }
    
    var scraperLoggingConfigurationResource = new ScraperLoggingConfiguration("scraperLoggingConfigurationResource", ScraperLoggingConfigurationArgs.builder()
        .loggingDestination(ScraperLoggingConfigurationLoggingDestinationArgs.builder()
            .cloudwatchLogs(ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs.builder()
                .logGroupArn("string")
                .build())
            .build())
        .scraperId("string")
        .region("string")
        .scraperComponents("string")
        .timeouts(ScraperLoggingConfigurationTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    scraper_logging_configuration_resource = aws.amp.ScraperLoggingConfiguration("scraperLoggingConfigurationResource",
        logging_destination={
            "cloudwatch_logs": {
                "log_group_arn": "string",
            },
        },
        scraper_id="string",
        region="string",
        scraper_components=["string"],
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const scraperLoggingConfigurationResource = new aws.amp.ScraperLoggingConfiguration("scraperLoggingConfigurationResource", {
        loggingDestination: {
            cloudwatchLogs: {
                logGroupArn: "string",
            },
        },
        scraperId: "string",
        region: "string",
        scraperComponents: ["string"],
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: aws:amp:ScraperLoggingConfiguration
    properties:
        loggingDestination:
            cloudwatchLogs:
                logGroupArn: string
        region: string
        scraperComponents:
            - string
        scraperId: string
        timeouts:
            create: string
            delete: string
            update: string
    

    ScraperLoggingConfiguration 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 ScraperLoggingConfiguration resource accepts the following input properties:

    LoggingDestination ScraperLoggingConfigurationLoggingDestination
    Configuration block for the logging destination. See loggingDestination Block below.
    ScraperId string

    ID of the scraper to configure logging for.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ScraperComponents List<string>
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    Timeouts ScraperLoggingConfigurationTimeouts
    LoggingDestination ScraperLoggingConfigurationLoggingDestinationArgs
    Configuration block for the logging destination. See loggingDestination Block below.
    ScraperId string

    ID of the scraper to configure logging for.

    The following arguments are optional:

    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ScraperComponents []string
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    Timeouts ScraperLoggingConfigurationTimeoutsArgs
    logging_destination object
    Configuration block for the logging destination. See loggingDestination Block below.
    scraper_id string

    ID of the scraper to configure logging for.

    The following arguments are optional:

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraper_components list(string)
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    timeouts object
    loggingDestination ScraperLoggingConfigurationLoggingDestination
    Configuration block for the logging destination. See loggingDestination Block below.
    scraperId String

    ID of the scraper to configure logging for.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraperComponents List<String>
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    timeouts ScraperLoggingConfigurationTimeouts
    loggingDestination ScraperLoggingConfigurationLoggingDestination
    Configuration block for the logging destination. See loggingDestination Block below.
    scraperId string

    ID of the scraper to configure logging for.

    The following arguments are optional:

    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraperComponents string[]
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    timeouts ScraperLoggingConfigurationTimeouts
    logging_destination ScraperLoggingConfigurationLoggingDestinationArgs
    Configuration block for the logging destination. See loggingDestination Block below.
    scraper_id str

    ID of the scraper to configure logging for.

    The following arguments are optional:

    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraper_components Sequence[str]
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    timeouts ScraperLoggingConfigurationTimeoutsArgs
    loggingDestination Property Map
    Configuration block for the logging destination. See loggingDestination Block below.
    scraperId String

    ID of the scraper to configure logging for.

    The following arguments are optional:

    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraperComponents List<String>
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ScraperLoggingConfiguration Resource

    Get an existing ScraperLoggingConfiguration 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?: ScraperLoggingConfigurationState, opts?: CustomResourceOptions): ScraperLoggingConfiguration
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            logging_destination: Optional[ScraperLoggingConfigurationLoggingDestinationArgs] = None,
            region: Optional[str] = None,
            scraper_components: Optional[Sequence[str]] = None,
            scraper_id: Optional[str] = None,
            timeouts: Optional[ScraperLoggingConfigurationTimeoutsArgs] = None) -> ScraperLoggingConfiguration
    func GetScraperLoggingConfiguration(ctx *Context, name string, id IDInput, state *ScraperLoggingConfigurationState, opts ...ResourceOption) (*ScraperLoggingConfiguration, error)
    public static ScraperLoggingConfiguration Get(string name, Input<string> id, ScraperLoggingConfigurationState? state, CustomResourceOptions? opts = null)
    public static ScraperLoggingConfiguration get(String name, Output<String> id, ScraperLoggingConfigurationState state, CustomResourceOptions options)
    resources:  _:    type: aws:amp:ScraperLoggingConfiguration    get:      id: ${id}
    import {
      to = aws_amp_scraper_logging_configuration.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:
    LoggingDestination ScraperLoggingConfigurationLoggingDestination
    Configuration block for the logging destination. See loggingDestination Block below.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ScraperComponents List<string>
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    ScraperId string

    ID of the scraper to configure logging for.

    The following arguments are optional:

    Timeouts ScraperLoggingConfigurationTimeouts
    LoggingDestination ScraperLoggingConfigurationLoggingDestinationArgs
    Configuration block for the logging destination. See loggingDestination Block below.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    ScraperComponents []string
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    ScraperId string

    ID of the scraper to configure logging for.

    The following arguments are optional:

    Timeouts ScraperLoggingConfigurationTimeoutsArgs
    logging_destination object
    Configuration block for the logging destination. See loggingDestination Block below.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraper_components list(string)
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    scraper_id string

    ID of the scraper to configure logging for.

    The following arguments are optional:

    timeouts object
    loggingDestination ScraperLoggingConfigurationLoggingDestination
    Configuration block for the logging destination. See loggingDestination Block below.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraperComponents List<String>
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    scraperId String

    ID of the scraper to configure logging for.

    The following arguments are optional:

    timeouts ScraperLoggingConfigurationTimeouts
    loggingDestination ScraperLoggingConfigurationLoggingDestination
    Configuration block for the logging destination. See loggingDestination Block below.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraperComponents string[]
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    scraperId string

    ID of the scraper to configure logging for.

    The following arguments are optional:

    timeouts ScraperLoggingConfigurationTimeouts
    logging_destination ScraperLoggingConfigurationLoggingDestinationArgs
    Configuration block for the logging destination. See loggingDestination Block below.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraper_components Sequence[str]
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    scraper_id str

    ID of the scraper to configure logging for.

    The following arguments are optional:

    timeouts ScraperLoggingConfigurationTimeoutsArgs
    loggingDestination Property Map
    Configuration block for the logging destination. See loggingDestination Block below.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    scraperComponents List<String>
    Scraper components to log. Valid values: COLLECTOR, EXPORTER, SERVICE_DISCOVERY.
    scraperId String

    ID of the scraper to configure logging for.

    The following arguments are optional:

    timeouts Property Map

    Supporting Types

    ScraperLoggingConfigurationLoggingDestination, ScraperLoggingConfigurationLoggingDestinationArgs

    CloudwatchLogs ScraperLoggingConfigurationLoggingDestinationCloudwatchLogs
    Configuration block for CloudWatch Logs destination. See cloudwatchLogs Block below.
    CloudwatchLogs ScraperLoggingConfigurationLoggingDestinationCloudwatchLogs
    Configuration block for CloudWatch Logs destination. See cloudwatchLogs Block below.
    cloudwatch_logs object
    Configuration block for CloudWatch Logs destination. See cloudwatchLogs Block below.
    cloudwatchLogs ScraperLoggingConfigurationLoggingDestinationCloudwatchLogs
    Configuration block for CloudWatch Logs destination. See cloudwatchLogs Block below.
    cloudwatchLogs ScraperLoggingConfigurationLoggingDestinationCloudwatchLogs
    Configuration block for CloudWatch Logs destination. See cloudwatchLogs Block below.
    cloudwatch_logs ScraperLoggingConfigurationLoggingDestinationCloudwatchLogs
    Configuration block for CloudWatch Logs destination. See cloudwatchLogs Block below.
    cloudwatchLogs Property Map
    Configuration block for CloudWatch Logs destination. See cloudwatchLogs Block below.

    ScraperLoggingConfigurationLoggingDestinationCloudwatchLogs, ScraperLoggingConfigurationLoggingDestinationCloudwatchLogsArgs

    LogGroupArn string
    ARN of the CloudWatch Logs log group. Must end with :*.
    LogGroupArn string
    ARN of the CloudWatch Logs log group. Must end with :*.
    log_group_arn string
    ARN of the CloudWatch Logs log group. Must end with :*.
    logGroupArn String
    ARN of the CloudWatch Logs log group. Must end with :*.
    logGroupArn string
    ARN of the CloudWatch Logs log group. Must end with :*.
    log_group_arn str
    ARN of the CloudWatch Logs log group. Must end with :*.
    logGroupArn String
    ARN of the CloudWatch Logs log group. Must end with :*.

    ScraperLoggingConfigurationTimeouts, ScraperLoggingConfigurationTimeoutsArgs

    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

    • scraperId (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 scraper logging configurations using scraperId. For example:

    $ pulumi import aws:amp/scraperLoggingConfiguration:ScraperLoggingConfiguration 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.46.0
    published on Thursday, Sep 10, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial