Skip to main content

scrapers

Creates, updates, deletes or gets a scraper resource or lists scrapers in a region

Overview

Namescrapers
TypeResource
DescriptionResource Type definition for AWS::APS::Scraper
Idaws.aps.scrapers

Fields

NameDatatypeDescription
scraper_idstringRequired to identify a specific scraper.
aliasstringScraper alias.
arnstringScraper ARN.
role_arnstringIAM role ARN for the scraper.
scrape_configurationobjectScraper configuration
sourceobjectScraper metrics source
destinationobjectScraper metrics destination
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTScrapeConfiguration, Source, Destination, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all scrapers in a region.

SELECT
region,
scraper_id,
alias,
arn,
role_arn,
scrape_configuration,
source,
destination,
tags
FROM aws.aps.scrapers
WHERE region = 'us-east-1';

Gets all properties from an individual scraper.

SELECT
region,
scraper_id,
alias,
arn,
role_arn,
scrape_configuration,
source,
destination,
tags
FROM aws.aps.scrapers
WHERE region = 'us-east-1' AND data__Identifier = '<Arn>';

INSERT example

Use the following StackQL query and manifest file to create a new scraper resource, using stack-deploy.

/*+ create */
INSERT INTO aws.aps.scrapers (
ScrapeConfiguration,
Source,
Destination,
region
)
SELECT
'{{ ScrapeConfiguration }}',
'{{ Source }}',
'{{ Destination }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.aps.scrapers
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';

Permissions

To operate on the scrapers resource, the following permissions are required:

Create

aps:CreateScraper,
aps:DescribeScraper,
aps:DescribeWorkspace,
aps:TagResource,
eks:CreateAccessEntry,
eks:AssociateAccessPolicy,
eks:DescribeCluster,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups,
iam:CreateServiceLinkedRole

Read

aps:DescribeScraper,
aps:ListTagsForResource

Update

aps:DescribeScraper,
aps:TagResource,
aps:UntagResource,
aps:ListTagsForResource

Delete

aps:DeleteScraper,
aps:DescribeScraper,
aps:DescribeWorkspace,
eks:AssociateAccessPolicy,
eks:DescribeCluster,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups,
iam:DeleteServiceLinkedRole

List

aps:ListScrapers,
aps:ListTagsForResource