Try AWS Native preview for resources not in the classic version.
aws.amp.Scraper
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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": {
"workspaceArn": "string",
},
},
source={
"eks": {
"clusterArn": "string",
"subnetIds": ["string"],
"securityGroupIds": ["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
The Scraper resource accepts the following input properties:
- Scrape
Configuration 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
Scraper
Destination - Configuration block for the managed scraper to send metrics to. See
destination
. - Source
Scraper
Source Configuration block to specify where the managed scraper will collect metrics from. See
source
.The following arguments are optional:
- Dictionary<string, string>
- Timeouts
Scraper
Timeouts
- Scrape
Configuration 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
Scraper
Destination Args - Configuration block for the managed scraper to send metrics to. See
destination
. - Source
Scraper
Source Args Configuration block to specify where the managed scraper will collect metrics from. See
source
.The following arguments are optional:
- map[string]string
- Timeouts
Scraper
Timeouts Args
- scrape
Configuration 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
Scraper
Destination - Configuration block for the managed scraper to send metrics to. See
destination
. - source
Scraper
Source Configuration block to specify where the managed scraper will collect metrics from. See
source
.The following arguments are optional:
- Map<String,String>
- timeouts
Scraper
Timeouts
- scrape
Configuration 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
Scraper
Destination - Configuration block for the managed scraper to send metrics to. See
destination
. - source
Scraper
Source Configuration block to specify where the managed scraper will collect metrics from. See
source
.The following arguments are optional:
- {[key: string]: string}
- timeouts
Scraper
Timeouts
- 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
Scraper
Destination Args - Configuration block for the managed scraper to send metrics to. See
destination
. - source
Scraper
Source Args Configuration block to specify where the managed scraper will collect metrics from. See
source
.The following arguments are optional:
- Mapping[str, str]
- timeouts
Scraper
Timeouts Args
- scrape
Configuration 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) -> 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.
- 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
Scraper
Destination - Configuration block for the managed scraper to send metrics to. See
destination
. - Role
Arn string - The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
- Scrape
Configuration string - The configuration file to use in the new scraper. For more information, see Scraper configuration.
- Source
Scraper
Source 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
Scraper
Timeouts
- 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
Scraper
Destination Args - Configuration block for the managed scraper to send metrics to. See
destination
. - Role
Arn string - The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
- Scrape
Configuration string - The configuration file to use in the new scraper. For more information, see Scraper configuration.
- Source
Scraper
Source 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
Scraper
Timeouts 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
Scraper
Destination - Configuration block for the managed scraper to send metrics to. See
destination
. - role
Arn String - The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
- scrape
Configuration String - The configuration file to use in the new scraper. For more information, see Scraper configuration.
- source
Scraper
Source 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
Scraper
Timeouts
- 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
Scraper
Destination - Configuration block for the managed scraper to send metrics to. See
destination
. - role
Arn string - The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
- scrape
Configuration string - The configuration file to use in the new scraper. For more information, see Scraper configuration.
- source
Scraper
Source 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
Scraper
Timeouts
- 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
Scraper
Destination 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
Scraper
Source 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
Scraper
Timeouts 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
. - role
Arn String - The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover, collect, and produce metrics
- scrape
Configuration 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
Scraper
Destination Amp - Configuration block for an Amazon Managed Prometheus workspace destination. See
amp
.
- Amp
Scraper
Destination Amp - Configuration block for an Amazon Managed Prometheus workspace destination. See
amp
.
- amp
Scraper
Destination Amp - Configuration block for an Amazon Managed Prometheus workspace destination. See
amp
.
- amp
Scraper
Destination Amp - Configuration block for an Amazon Managed Prometheus workspace destination. See
amp
.
- amp
Scraper
Destination 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
- Workspace
Arn string - The Amazon Resource Name (ARN) of the prometheus workspace.
- Workspace
Arn string - The Amazon Resource Name (ARN) of the prometheus workspace.
- workspace
Arn String - The Amazon Resource Name (ARN) of the prometheus workspace.
- workspace
Arn string - The Amazon Resource Name (ARN) of the prometheus workspace.
- workspace_
arn str - The Amazon Resource Name (ARN) of the prometheus workspace.
- workspace
Arn String - The Amazon Resource Name (ARN) of the prometheus workspace.
ScraperSource, ScraperSourceArgs
- Eks
Scraper
Source Eks - Configuration block for an EKS cluster source. See
eks
.
- Eks
Scraper
Source Eks - Configuration block for an EKS cluster source. See
eks
.
- eks
Scraper
Source Eks - Configuration block for an EKS cluster source. See
eks
.
- eks
Scraper
Source Eks - Configuration block for an EKS cluster source. See
eks
.
- eks
Scraper
Source Eks - Configuration block for an EKS cluster source. See
eks
.
- eks Property Map
- Configuration block for an EKS cluster source. See
eks
.
ScraperSourceEks, ScraperSourceEksArgs
- Cluster
Arn string - Subnet
Ids List<string> - List of subnet IDs. Must be in at least two different availability zones.
- Security
Group List<string>Ids - List of the security group IDs for the Amazon EKS cluster VPC configuration.
- Cluster
Arn string - Subnet
Ids []string - List of subnet IDs. Must be in at least two different availability zones.
- Security
Group []stringIds - List of the security group IDs for the Amazon EKS cluster VPC configuration.
- cluster
Arn String - subnet
Ids List<String> - List of subnet IDs. Must be in at least two different availability zones.
- security
Group List<String>Ids - List of the security group IDs for the Amazon EKS cluster VPC configuration.
- cluster
Arn string - subnet
Ids string[] - List of subnet IDs. Must be in at least two different availability zones.
- security
Group 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.
- cluster
Arn String - subnet
Ids List<String> - List of subnet IDs. Must be in at least two different availability zones.
- security
Group 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
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.