scrapers
Creates, updates, deletes or gets a scraper
resource or lists scrapers
in a region
Overview
Name | scrapers |
Type | Resource |
Description | Resource Type definition for AWS::APS::Scraper |
Id | aws.aps.scrapers |
Fields
Name | Datatype | Description |
---|---|---|
scraper_id | string | Required to identify a specific scraper. |
alias | string | Scraper alias. |
arn | string | Scraper ARN. |
role_arn | string | IAM role ARN for the scraper. |
scrape_configuration | object | Scraper configuration |
source | object | Scraper metrics source |
destination | object | Scraper metrics destination |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ScrapeConfiguration, Source, Destination, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.aps.scrapers (
ScrapeConfiguration,
Source,
Destination,
region
)
SELECT
'{{ ScrapeConfiguration }}',
'{{ Source }}',
'{{ Destination }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.aps.scrapers (
Alias,
ScrapeConfiguration,
Source,
Destination,
Tags,
region
)
SELECT
'{{ Alias }}',
'{{ ScrapeConfiguration }}',
'{{ Source }}',
'{{ Destination }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: scraper
props:
- name: Alias
value: '{{ Alias }}'
- name: ScrapeConfiguration
value:
ConfigurationBlob: '{{ ConfigurationBlob }}'
- name: Source
value:
EksConfiguration:
ClusterArn: '{{ ClusterArn }}'
SecurityGroupIds:
- '{{ SecurityGroupIds[0] }}'
SubnetIds:
- '{{ SubnetIds[0] }}'
- name: Destination
value:
AmpConfiguration:
WorkspaceArn: '{{ WorkspaceArn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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