import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages an Amazon Managed Service for Prometheus (AMP) Scraper Logging Configuration. * * ## Example Usage * * ### Basic Usage * * ```typescript * 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, * }); * ``` * * ### With Scraper Components * * ```typescript * 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 * * ### 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: * * ```sh * $ pulumi import aws:amp/scraperLoggingConfiguration:ScraperLoggingConfiguration example s-b6f487db-4761-4930-9215-e9d588a7efe2 * ``` */ export declare class ScraperLoggingConfiguration extends pulumi.CustomResource { /** * Get an existing ScraperLoggingConfiguration resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ScraperLoggingConfigurationState, opts?: pulumi.CustomResourceOptions): ScraperLoggingConfiguration; /** * Returns true if the given object is an instance of ScraperLoggingConfiguration. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ScraperLoggingConfiguration; /** * Configuration block for the logging destination. See `loggingDestination` Block below. */ readonly loggingDestination: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Scraper components to log. Valid values: `COLLECTOR`, `EXPORTER`, `SERVICE_DISCOVERY`. */ readonly scraperComponents: pulumi.Output; /** * ID of the scraper to configure logging for. * * The following arguments are optional: */ readonly scraperId: pulumi.Output; readonly timeouts: pulumi.Output; /** * Create a ScraperLoggingConfiguration resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ScraperLoggingConfigurationArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ScraperLoggingConfiguration resources. */ export interface ScraperLoggingConfigurationState { /** * Configuration block for the logging destination. See `loggingDestination` Block below. */ loggingDestination?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Scraper components to log. Valid values: `COLLECTOR`, `EXPORTER`, `SERVICE_DISCOVERY`. */ scraperComponents?: pulumi.Input[] | undefined>; /** * ID of the scraper to configure logging for. * * The following arguments are optional: */ scraperId?: pulumi.Input; timeouts?: pulumi.Input; } /** * The set of arguments for constructing a ScraperLoggingConfiguration resource. */ export interface ScraperLoggingConfigurationArgs { /** * Configuration block for the logging destination. See `loggingDestination` Block below. */ loggingDestination: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Scraper components to log. Valid values: `COLLECTOR`, `EXPORTER`, `SERVICE_DISCOVERY`. */ scraperComponents?: pulumi.Input[] | undefined>; /** * ID of the scraper to configure logging for. * * The following arguments are optional: */ scraperId: pulumi.Input; timeouts?: pulumi.Input; } //# sourceMappingURL=scraperLoggingConfiguration.d.ts.map