2023/11/27 - Amazon Prometheus Service - 5 new api methods
Changes This release adds support for the Amazon Managed Service for Prometheus collector, a fully managed, agentless Prometheus metrics scraping capability.
Gets a default configuration.
See also: AWS API Documentation
Request Syntax
client.get_default_scraper_configuration()
dict
Response Syntax
{ 'configuration': b'bytes' }
Response Structure
(dict) --
Represents the output of a GetDefaultScraperConfiguration operation.
configuration (bytes) --
The default configuration.
Create a scraper.
See also: AWS API Documentation
Request Syntax
client.create_scraper( alias='string', scrapeConfiguration={ 'configurationBlob': b'bytes' }, source={ 'eksConfiguration': { 'clusterArn': 'string', 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } }, destination={ 'ampConfiguration': { 'workspaceArn': 'string' } }, clientToken='string', tags={ 'string': 'string' } )
string
An optional user-assigned alias for this scraper. This alias is for user reference and does not need to be unique.
dict
[REQUIRED]
The configuration used to create the scraper.
configurationBlob (bytes) --
Binary data representing a Prometheus configuration file.
dict
[REQUIRED]
The source that the scraper will be discovering and collecting metrics from.
eksConfiguration (dict) --
A representation of an EKS source.
clusterArn (string) -- [REQUIRED]
The ARN of an EKS cluster.
securityGroupIds (list) --
A list of security group IDs specified for VPC configuration.
(string) --
ID of a VPC security group.
subnetIds (list) -- [REQUIRED]
A list of subnet IDs specified for VPC configuration.
(string) --
ID of a VPC subnet.
dict
[REQUIRED]
The destination that the scraper will be producing metrics to.
ampConfiguration (dict) --
A representation of an AMP destination.
workspaceArn (string) -- [REQUIRED]
The ARN of an AMP workspace.
string
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
This field is autopopulated if not provided.
dict
Optional, user-provided tags for this scraper.
(string) --
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .
(string) --
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @
dict
Response Syntax
{ 'scraperId': 'string', 'arn': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'DELETION_FAILED' }, 'tags': { 'string': 'string' } }
Response Structure
(dict) --
Represents the output of a CreateScraper operation.
scraperId (string) --
The generated ID of the scraper that was just created.
arn (string) --
The ARN of the scraper that was just created.
status (dict) --
The status of the scraper that was just created (usually CREATING).
statusCode (string) --
Status code of this scraper.
tags (dict) --
The tags of this scraper.
(string) --
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .
(string) --
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @
Lists all scrapers in a customer account, including scrapers being created or deleted. You may provide filters to return a more specific list of results.
See also: AWS API Documentation
Request Syntax
client.list_scrapers( filters={ 'string': [ 'string', ] }, nextToken='string', maxResults=123 )
dict
A list of scraper filters.
(string) --
The name of the key to filter by. Currently supported filter keys are 'status', 'sourceArn', 'destinationArn', and 'alias'.
(list) --
The values of the given key to filter by.
(string) --
The value of a given key to filter by.
string
Pagination token to request the next page in a paginated list. This token is obtained from the output of the previous ListScrapers request.
integer
Maximum results to return in response (default=100, maximum=1000).
dict
Response Syntax
{ 'scrapers': [ { 'alias': 'string', 'scraperId': 'string', 'arn': 'string', 'roleArn': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'DELETION_FAILED' }, 'createdAt': datetime(2015, 1, 1), 'lastModifiedAt': datetime(2015, 1, 1), 'tags': { 'string': 'string' }, 'statusReason': 'string', 'source': { 'eksConfiguration': { 'clusterArn': 'string', 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } }, 'destination': { 'ampConfiguration': { 'workspaceArn': 'string' } } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
Represents the output of a ListScrapers operation.
scrapers (list) --
The list of scrapers, filtered down if a set of filters was provided in the request.
(dict) --
Represents a summary of the properties of a scraper.
alias (string) --
Alias of this scraper.
scraperId (string) --
Unique string identifying this scraper.
arn (string) --
The Amazon Resource Name (ARN) of this scraper.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to dsicover, collect, and produce metrics on your behalf.
status (dict) --
The status of this scraper.
statusCode (string) --
Status code of this scraper.
createdAt (datetime) --
The time when the scraper was created.
lastModifiedAt (datetime) --
The time when the scraper was last modified.
tags (dict) --
The tags of this scraper.
(string) --
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .
(string) --
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @
statusReason (string) --
The reason for failure if any.
source (dict) --
The source that the scraper is discovering and collecting metrics from.
eksConfiguration (dict) --
A representation of an EKS source.
clusterArn (string) --
The ARN of an EKS cluster.
securityGroupIds (list) --
A list of security group IDs specified for VPC configuration.
(string) --
ID of a VPC security group.
subnetIds (list) --
A list of subnet IDs specified for VPC configuration.
(string) --
ID of a VPC subnet.
destination (dict) --
The destination that the scraper is producing metrics to.
ampConfiguration (dict) --
A representation of an AMP destination.
workspaceArn (string) --
The ARN of an AMP workspace.
nextToken (string) --
Pagination token to use when requesting the next page in this list.
Deletes a scraper.
See also: AWS API Documentation
Request Syntax
client.delete_scraper( scraperId='string', clientToken='string' )
string
[REQUIRED]
The ID of the scraper to delete.
string
Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'scraperId': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'DELETION_FAILED' } }
Response Structure
(dict) --
Represents the output of a DeleteScraper operation.
scraperId (string) --
The ID of the scraper that was deleted.
status (dict) --
The status of the scraper that is being deleted.
statusCode (string) --
Status code of this scraper.
Describe an existing scraper.
See also: AWS API Documentation
Request Syntax
client.describe_scraper( scraperId='string' )
string
[REQUIRED]
The IDs of the scraper to describe.
dict
Response Syntax
{ 'scraper': { 'alias': 'string', 'scraperId': 'string', 'arn': 'string', 'roleArn': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'DELETION_FAILED' }, 'createdAt': datetime(2015, 1, 1), 'lastModifiedAt': datetime(2015, 1, 1), 'tags': { 'string': 'string' }, 'statusReason': 'string', 'scrapeConfiguration': { 'configurationBlob': b'bytes' }, 'source': { 'eksConfiguration': { 'clusterArn': 'string', 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } }, 'destination': { 'ampConfiguration': { 'workspaceArn': 'string' } } } }
Response Structure
(dict) --
Represents the output of a DescribeScraper operation.
scraper (dict) --
The properties of the selected scrapers.
alias (string) --
Alias of this scraper.
scraperId (string) --
Unique string identifying this scraper.
arn (string) --
The Amazon Resource Name (ARN) of this scraper.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to dsicover, collect, and produce metrics on your behalf.
status (dict) --
The status of this scraper.
statusCode (string) --
Status code of this scraper.
createdAt (datetime) --
The time when the scraper was created.
lastModifiedAt (datetime) --
The time when the scraper was last modified.
tags (dict) --
The tags of this scraper.
(string) --
The key of the tag.
Constraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @ May not begin with aws: .
(string) --
The value of the tag.
Constraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters. Valid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @
statusReason (string) --
The reason for failure if any.
scrapeConfiguration (dict) --
The configuration used to create the scraper.
configurationBlob (bytes) --
Binary data representing a Prometheus configuration file.
source (dict) --
The source that the scraper is discovering and collecting metrics from.
eksConfiguration (dict) --
A representation of an EKS source.
clusterArn (string) --
The ARN of an EKS cluster.
securityGroupIds (list) --
A list of security group IDs specified for VPC configuration.
(string) --
ID of a VPC security group.
subnetIds (list) --
A list of subnet IDs specified for VPC configuration.
(string) --
ID of a VPC subnet.
destination (dict) --
The destination that the scraper is producing metrics to.
ampConfiguration (dict) --
A representation of an AMP destination.
workspaceArn (string) --
The ARN of an AMP workspace.