1. Packages
  2. AWS
  3. API Docs
  4. amp
  5. Scraper
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.amp.Scraper

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Import

    Using pulumi import, import the Managed Scraper using its identifier. For example:

    $ pulumi import aws:amp/scraper:Scraper example s-0123abc-0000-0123-a000-000000000000
    

    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,
                scrape_configuration: Optional[str] = None,
                alias: Optional[str] = None,
                destination: Optional[ScraperDestinationArgs] = 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.
    
    

    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()
    {
        ScrapeConfiguration = "string",
        Alias = "string",
        Destination = new Aws.Amp.Inputs.ScraperDestinationArgs
        {
            Amp = new Aws.Amp.Inputs.ScraperDestinationAmpArgs
            {
                WorkspaceArn = "string",
            },
        },
        Source = new Aws.Amp.Inputs.ScraperSourceArgs
        {
            Eks = new Aws.Amp.Inputs.ScraperSourceEksArgs
            {
                ClusterArn = "string",
                SubnetIds = new[]
                {
                    "string",
                },
                SecurityGroupIds = new[]
                {
                    "string",
                },
            },
        },
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.Amp.Inputs.ScraperTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := amp.NewScraper(ctx, "scraperResource", &amp.ScraperArgs{
    	ScrapeConfiguration: pulumi.String("string"),
    	Alias:               pulumi.String("string"),
    	Destination: &amp.ScraperDestinationArgs{
    		Amp: &amp.ScraperDestinationAmpArgs{
    			WorkspaceArn: 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"),
    			},
    		},
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &amp.ScraperTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var scraperResource = new Scraper("scraperResource", ScraperArgs.builder()
        .scrapeConfiguration("string")
        .alias("string")
        .destination(ScraperDestinationArgs.builder()
            .amp(ScraperDestinationAmpArgs.builder()
                .workspaceArn("string")
                .build())
            .build())
        .source(ScraperSourceArgs.builder()
            .eks(ScraperSourceEksArgs.builder()
                .clusterArn("string")
                .subnetIds("string")
                .securityGroupIds("string")
                .build())
            .build())
        .tags(Map.of("string", "string"))
        .timeouts(ScraperTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    scraper_resource = aws.amp.Scraper("scraperResource",
        scrape_configuration="string",
        alias="string",
        destination={
            "amp": {
                "workspace_arn": "string",
            },
        },
        source={
            "eks": {
                "cluster_arn": "string",
                "subnet_ids": ["string"],
                "security_group_ids": ["string"],
            },
        },
        tags={
            "string": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const scraperResource = new aws.amp.Scraper("scraperResource", {
        scrapeConfiguration: "string",
        alias: "string",
        destination: {
            amp: {
                workspaceArn: "string",
            },
        },
        source: {
            eks: {
                clusterArn: "string",
                subnetIds: ["string"],
                securityGroupIds: ["string"],
            },
        },
        tags: {
            string: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: aws:amp:Scraper
    properties:
        alias: string
        destination:
            amp:
                workspaceArn: string
        scrapeConfiguration: string
        source:
            eks:
                clusterArn: string
                securityGroupIds:
                    - string
                subnetIds:
                    - string
        tags:
            string: string
        timeouts:
            create: string
            delete: 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:

    ScrapeConfiguration string
    The configuration file to use in the new scraper. For more information, see Scraper configuration.
    Alias string
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    Destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination.
    Source ScraperSource

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

    The following arguments are optional:

    Tags Dictionary<string, string>
    Timeouts ScraperTimeouts
    ScrapeConfiguration string
    The configuration file to use in the new scraper. For more information, see Scraper configuration.
    Alias string
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    Destination ScraperDestinationArgs
    Configuration block for the managed scraper to send metrics to. See destination.
    Source ScraperSourceArgs

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

    The following arguments are optional:

    Tags map[string]string
    Timeouts ScraperTimeoutsArgs
    scrapeConfiguration String
    The configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias String
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination.
    source ScraperSource

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

    The following arguments are optional:

    tags Map<String,String>
    timeouts ScraperTimeouts
    scrapeConfiguration string
    The configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias string
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination.
    source ScraperSource

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

    The following arguments are optional:

    tags {[key: string]: string}
    timeouts ScraperTimeouts
    scrape_configuration str
    The configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias str
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    destination ScraperDestinationArgs
    Configuration block for the managed scraper to send metrics to. See destination.
    source ScraperSourceArgs

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

    The following arguments are optional:

    tags Mapping[str, str]
    timeouts ScraperTimeoutsArgs
    scrapeConfiguration String
    The configuration file to use in the new scraper. For more information, see Scraper configuration.
    alias String
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    destination Property Map
    Configuration block for the managed scraper to send metrics to. See destination.
    source Property Map

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

    The following arguments are optional:

    tags Map<String>
    timeouts Property Map

    Outputs

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

    Arn string
    The Amazon Resource Name (ARN) of the new scraper.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleArn string
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) of the new scraper.
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleArn string
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the new scraper.
    id String
    The provider-assigned unique ID for this managed resource.
    roleArn String
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) of the new scraper.
    id string
    The provider-assigned unique ID for this managed resource.
    roleArn string
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name (ARN) of the new scraper.
    id str
    The provider-assigned unique ID for this managed resource.
    role_arn str
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the new scraper.
    id String
    The provider-assigned unique ID for this managed resource.
    roleArn String
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    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,
            role_arn: Optional[str] = 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)
    Resource lookup is not supported in YAML
    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
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    Arn string
    The Amazon Resource Name (ARN) of the new scraper.
    Destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination.
    RoleArn string
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    ScrapeConfiguration string
    The 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.

    The following arguments are optional:

    Tags Dictionary<string, string>
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Timeouts ScraperTimeouts
    Alias string
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    Arn string
    The Amazon Resource Name (ARN) of the new scraper.
    Destination ScraperDestinationArgs
    Configuration block for the managed scraper to send metrics to. See destination.
    RoleArn string
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    ScrapeConfiguration string
    The 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.

    The following arguments are optional:

    Tags map[string]string
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    Timeouts ScraperTimeoutsArgs
    alias String
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn String
    The Amazon Resource Name (ARN) of the new scraper.
    destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination.
    roleArn String
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    scrapeConfiguration String
    The 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.

    The following arguments are optional:

    tags Map<String,String>
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    timeouts ScraperTimeouts
    alias string
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn string
    The Amazon Resource Name (ARN) of the new scraper.
    destination ScraperDestination
    Configuration block for the managed scraper to send metrics to. See destination.
    roleArn string
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    scrapeConfiguration string
    The 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.

    The following arguments are optional:

    tags {[key: string]: string}
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    timeouts ScraperTimeouts
    alias str
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn str
    The Amazon Resource Name (ARN) of the new scraper.
    destination ScraperDestinationArgs
    Configuration block for the managed scraper to send metrics to. See destination.
    role_arn str
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    scrape_configuration str
    The 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.

    The following arguments are optional:

    tags Mapping[str, str]
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    timeouts ScraperTimeoutsArgs
    alias String
    a name to associate with the managed scraper. This is for your use, and does not need to be unique.
    arn String
    The Amazon Resource Name (ARN) of the new scraper.
    destination Property Map
    Configuration block for the managed scraper to send metrics to. See destination.
    roleArn String
    The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
    scrapeConfiguration String
    The 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.

    The following arguments are optional:

    tags Map<String>
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    timeouts Property Map

    Supporting Types

    ScraperDestination, ScraperDestinationArgs

    Amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
    Amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
    amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
    amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
    amp ScraperDestinationAmp
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
    amp Property Map
    Configuration block for an Amazon Managed Prometheus workspace destination. See amp.

    ScraperDestinationAmp, ScraperDestinationAmpArgs

    WorkspaceArn string
    The Amazon Resource Name (ARN) of the prometheus workspace.
    WorkspaceArn string
    The Amazon Resource Name (ARN) of the prometheus workspace.
    workspaceArn String
    The Amazon Resource Name (ARN) of the prometheus workspace.
    workspaceArn string
    The Amazon Resource Name (ARN) of the prometheus workspace.
    workspace_arn str
    The Amazon Resource Name (ARN) of the prometheus workspace.
    workspaceArn String
    The Amazon Resource Name (ARN) of the prometheus workspace.

    ScraperSource, ScraperSourceArgs

    Eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks.
    Eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks.
    eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks.
    eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks.
    eks ScraperSourceEks
    Configuration block for an EKS cluster source. See eks.
    eks Property Map
    Configuration block for an EKS cluster source. See eks.

    ScraperSourceEks, ScraperSourceEksArgs

    ClusterArn string
    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
    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.
    clusterArn String
    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
    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
    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
    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.

    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.
    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.
    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.
    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.
    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.
    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.

    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 v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi