aws.amp.Scraper
Explore with Pulumi AI
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", &.ScraperArgs{
	ScrapeConfiguration: pulumi.String("string"),
	Alias:               pulumi.String("string"),
	Destination: &.ScraperDestinationArgs{
		Amp: &.ScraperDestinationAmpArgs{
			WorkspaceArn: pulumi.String("string"),
		},
	},
	Source: &.ScraperSourceArgs{
		Eks: &.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: &.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: 
- 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
ScraperDestination Args 
- Configuration block for the managed scraper to send metrics to. See destination.
- Source
ScraperSource Args 
- Configuration block to specify where the managed scraper will collect metrics from. See - source.- The following arguments are optional: 
- map[string]string
- Timeouts
ScraperTimeouts Args 
- 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: 
- 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: 
- {[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
ScraperDestination Args 
- Configuration block for the managed scraper to send metrics to. See destination.
- source
ScraperSource Args 
- Configuration block to specify where the managed scraper will collect metrics from. See - source.- The following arguments are optional: 
- Mapping[str, str]
- timeouts
ScraperTimeouts Args 
- 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: 
- Map<String>
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Scraper resource produces the following output properties:
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) -> Scraperfunc 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}- 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.
- 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: 
- Dictionary<string, string>
- Dictionary<string, string>
- 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 Args 
- 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 Args 
- Configuration block to specify where the managed scraper will collect metrics from. See - source.- The following arguments are optional: 
- map[string]string
- map[string]string
- Timeouts
ScraperTimeouts Args 
- 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: 
- Map<String,String>
- Map<String,String>
- 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: 
- {[key: string]: string}
- {[key: string]: string}
- 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
ScraperDestination Args 
- 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
ScraperSource Args 
- Configuration block to specify where the managed scraper will collect metrics from. See - source.- The following arguments are optional: 
- Mapping[str, str]
- Mapping[str, str]
- timeouts
ScraperTimeouts Args 
- 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: 
- Map<String>
- Map<String>
- timeouts Property Map
Supporting Types
ScraperDestination, ScraperDestinationArgs    
- Amp
ScraperDestination Amp 
- Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
- Amp
ScraperDestination Amp 
- Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
- amp
ScraperDestination Amp 
- Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
- amp
ScraperDestination Amp 
- Configuration block for an Amazon Managed Prometheus workspace destination. See amp.
- amp
ScraperDestination Amp 
- 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
ScraperSource Eks 
- Configuration block for an EKS cluster source. See eks.
- Eks
ScraperSource Eks 
- Configuration block for an EKS cluster source. See eks.
- eks
ScraperSource Eks 
- Configuration block for an EKS cluster source. See eks.
- eks
ScraperSource Eks 
- Configuration block for an EKS cluster source. See eks.
- eks
ScraperSource Eks 
- 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.
- SecurityGroup List<string>Ids 
- 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.
- SecurityGroup []stringIds 
- 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.
- securityGroup List<String>Ids 
- 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.
- securityGroup string[]Ids 
- 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_ Sequence[str]ids 
- 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.
- securityGroup List<String>Ids 
- 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 awsTerraform Provider.