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
Idawscc.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
role_configurationobjectRole configuration
sourceobjectScraper metrics source
destinationobjectScraper metrics destination
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

For more information, see AWS::APS::Scraper.

Methods

NameResourceAccessible byRequired Params
create_resourcescrapersINSERTScrapeConfiguration, Source, Destination, region
delete_resourcescrapersDELETEIdentifier, region
update_resourcescrapersUPDATEIdentifier, PatchDocument, region
list_resourcesscrapers_list_onlySELECTregion
get_resourcescrapersSELECTIdentifier, region

SELECT examples

Gets all properties from an individual scraper.

SELECT
region,
scraper_id,
alias,
arn,
role_arn,
scrape_configuration,
role_configuration,
source,
destination,
tags
FROM awscc.aps.scrapers
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.aps.scrapers
SET PatchDocument = string('{{ {
"Alias": alias,
"ScrapeConfiguration": scrape_configuration,
"RoleConfiguration": role_configuration,
"Destination": destination,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.aps.scrapers
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

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

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