PrometheusService ***************** Client ====== class PrometheusService.Client A low-level client representing Amazon Prometheus Service Amazon Managed Service for Prometheus is a serverless, Prometheus- compatible monitoring service for container metrics that makes it easier to securely monitor container environments at scale. With Amazon Managed Service for Prometheus, you can use the same open- source Prometheus data model and query language that you use today to monitor the performance of your containerized workloads, and also enjoy improved scalability, availability, and security without having to manage the underlying infrastructure. For more information about Amazon Managed Service for Prometheus, see the Amazon Managed Service for Prometheus User Guide. Amazon Managed Service for Prometheus includes two APIs. * Use the Amazon Web Services API described in this guide to manage Amazon Managed Service for Prometheus resources, such as workspaces, rule groups, and alert managers. * Use the Prometheus-compatible API to work within your Prometheus workspace. import boto3 client = boto3.client('amp') These are the available methods: * can_paginate * close * create_alert_manager_definition * create_logging_configuration * create_query_logging_configuration * create_rule_groups_namespace * create_scraper * create_workspace * delete_alert_manager_definition * delete_logging_configuration * delete_query_logging_configuration * delete_rule_groups_namespace * delete_scraper * delete_workspace * describe_alert_manager_definition * describe_logging_configuration * describe_query_logging_configuration * describe_rule_groups_namespace * describe_scraper * describe_workspace * describe_workspace_configuration * get_default_scraper_configuration * get_paginator * get_waiter * list_rule_groups_namespaces * list_scrapers * list_tags_for_resource * list_workspaces * put_alert_manager_definition * put_rule_groups_namespace * tag_resource * untag_resource * update_logging_configuration * update_query_logging_configuration * update_scraper * update_workspace_alias * update_workspace_configuration Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * ListRuleGroupsNamespaces * ListScrapers * ListWorkspaces Waiters ======= Waiters are available on a client instance via the "get_waiter" method. For more detailed instructions and examples on the usage or waiters, see the waiters user guide. The available waiters are: * ScraperActive * ScraperDeleted * WorkspaceActive * WorkspaceDeleted PrometheusService / Waiter / WorkspaceActive WorkspaceActive *************** class PrometheusService.Waiter.WorkspaceActive waiter = client.get_waiter('workspace_active') wait(**kwargs) Polls "PrometheusService.Client.describe_workspace()" every 2 seconds until a successful state is reached. An error is raised after 60 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( workspaceId='string', WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to describe. * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 2 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 60 Returns: None PrometheusService / Waiter / ScraperActive ScraperActive ************* class PrometheusService.Waiter.ScraperActive waiter = client.get_waiter('scraper_active') wait(**kwargs) Polls "PrometheusService.Client.describe_scraper()" every 2 seconds until a successful state is reached. An error is raised after 60 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( scraperId='string', WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **scraperId** (*string*) -- **[REQUIRED]** The ID of the scraper to describe. * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 2 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 60 Returns: None PrometheusService / Waiter / WorkspaceDeleted WorkspaceDeleted **************** class PrometheusService.Waiter.WorkspaceDeleted waiter = client.get_waiter('workspace_deleted') wait(**kwargs) Polls "PrometheusService.Client.describe_workspace()" every 2 seconds until a successful state is reached. An error is raised after 60 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( workspaceId='string', WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to describe. * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 2 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 60 Returns: None PrometheusService / Waiter / ScraperDeleted ScraperDeleted ************** class PrometheusService.Waiter.ScraperDeleted waiter = client.get_waiter('scraper_deleted') wait(**kwargs) Polls "PrometheusService.Client.describe_scraper()" every 2 seconds until a successful state is reached. An error is raised after 60 failed checks. See also: AWS API Documentation **Request Syntax** waiter.wait( scraperId='string', WaiterConfig={ 'Delay': 123, 'MaxAttempts': 123 } ) Parameters: * **scraperId** (*string*) -- **[REQUIRED]** The ID of the scraper to describe. * **WaiterConfig** (*dict*) -- A dictionary that provides parameters to control waiting behavior. * **Delay** *(integer) --* The amount of time in seconds to wait between attempts. Default: 2 * **MaxAttempts** *(integer) --* The maximum number of attempts to be made. Default: 60 Returns: None PrometheusService / Paginator / ListRuleGroupsNamespaces ListRuleGroupsNamespaces ************************ class PrometheusService.Paginator.ListRuleGroupsNamespaces paginator = client.get_paginator('list_rule_groups_namespaces') paginate(**kwargs) Creates an iterator that will paginate through responses from "PrometheusService.Client.list_rule_groups_namespaces()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( name='string', workspaceId='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **name** (*string*) -- Use this parameter to filter the rule groups namespaces that are returned. Only the namespaces with names that begin with the value that you specify are returned. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace containing the rule groups namespaces. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'ruleGroupsNamespaces': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'modifiedAt': datetime(2015, 1, 1), 'name': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' }, 'tags': { 'string': 'string' } }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* Represents the output of a "ListRuleGroupsNamespaces" operation. * **ruleGroupsNamespaces** *(list) --* The returned list of rule groups namespaces. * *(dict) --* The high-level information about a rule groups namespace. To retrieve more information, use "DescribeRuleGroupsNamespace". * **arn** *(string) --* The ARN of the rule groups namespace. * **createdAt** *(datetime) --* The date and time that the rule groups namespace was created. * **modifiedAt** *(datetime) --* The date and time that the rule groups namespace was most recently changed. * **name** *(string) --* The name of the rule groups namespace. * **status** *(dict) --* A structure that displays the current status of the rule groups namespace. * **statusCode** *(string) --* The current status of the namespace. * **statusReason** *(string) --* The reason for the failure, if any. * **tags** *(dict) --* The list of tag keys and values that are associated with the rule groups namespace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. * **NextToken** *(string) --* A token to resume pagination. PrometheusService / Paginator / ListScrapers ListScrapers ************ class PrometheusService.Paginator.ListScrapers paginator = client.get_paginator('list_scrapers') paginate(**kwargs) Creates an iterator that will paginate through responses from "PrometheusService.Client.list_scrapers()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( filters={ 'string': [ 'string', ] }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **filters** (*dict*) -- (Optional) A list of key-value pairs to filter the list of scrapers returned. Keys include "status", "sourceArn", "destinationArn", and "alias". Filters on the same key are "OR"'d together, and filters on different keys are "AND"'d together. For example, "status=ACTIVE&status=CREATING&alias=Test", will return all scrapers that have the alias Test, and are either in status ACTIVE or CREATING. To find all active scrapers that are sending metrics to a specific Amazon Managed Service for Prometheus workspace, you would use the ARN of the workspace in a query: "status=ACTIVE&destinationArn=arn:aws:aps:us- east-1:123456789012:workspace/ws-example1-1234-abcd- 56ef-123456789012" If this is included, it filters the results to only the scrapers that match the filter. * *(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 by which to filter. * *(string) --* The value for a given key by which to filter. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'scrapers': [ { 'alias': 'string', 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'destination': { 'ampConfiguration': { 'workspaceArn': 'string' } }, 'lastModifiedAt': datetime(2015, 1, 1), 'roleArn': 'string', 'roleConfiguration': { 'sourceRoleArn': 'string', 'targetRoleArn': 'string' }, 'scraperId': 'string', 'source': { 'eksConfiguration': { 'clusterArn': 'string', 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } }, 'status': { 'statusCode': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED'|'DELETION_FAILED' }, 'statusReason': 'string', 'tags': { 'string': 'string' } }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* Represents the output of a "ListScrapers" operation. * **scrapers** *(list) --* A list of "ScraperSummary" structures giving information about scrapers in the account that match the filters provided. * *(dict) --* The "ScraperSummary" structure contains a summary of the details about one scraper in your account. * **alias** *(string) --* (Optional) A name associated with the scraper. * **arn** *(string) --* The Amazon Resource Name (ARN) of the scraper. * **createdAt** *(datetime) --* The date and time that the scraper was created. * **destination** *(dict) --* The Amazon Managed Service for Prometheus workspace the scraper sends metrics to. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "ampConfiguration". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **ampConfiguration** *(dict) --* The Amazon Managed Service for Prometheus workspace to send metrics to. * **workspaceArn** *(string) --* ARN of the Amazon Managed Service for Prometheus workspace. * **lastModifiedAt** *(datetime) --* The date and time that the scraper was last modified. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover and collect metrics on your behalf. * **roleConfiguration** *(dict) --* This structure displays information about the IAM roles used for cross-account scraping configuration. * **sourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the source account to enable cross-account scraping. For information about the contents of this policy, see Cross-account setup. * **targetRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the target account to enable cross-account scraping. For information about the contents of this policy, see Cross-account setup. * **scraperId** *(string) --* The ID of the scraper. * **source** *(dict) --* The Amazon EKS cluster from which the scraper collects metrics. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "eksConfiguration". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **eksConfiguration** *(dict) --* The Amazon EKS cluster from which a scraper collects metrics. * **clusterArn** *(string) --* ARN of the Amazon EKS cluster. * **securityGroupIds** *(list) --* A list of the security group IDs for the Amazon EKS cluster VPC configuration. * *(string) --* ID of a VPC security group. * **subnetIds** *(list) --* A list of subnet IDs for the Amazon EKS cluster VPC configuration. * *(string) --* ID of a VPC subnet. * **status** *(dict) --* A structure that contains the current status of the scraper. * **statusCode** *(string) --* The current status of the scraper. * **statusReason** *(string) --* If there is a failure, the reason for the failure. * **tags** *(dict) --* (Optional) The list of tag keys and values associated with the scraper. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. * **NextToken** *(string) --* A token to resume pagination. PrometheusService / Paginator / ListWorkspaces ListWorkspaces ************** class PrometheusService.Paginator.ListWorkspaces paginator = client.get_paginator('list_workspaces') paginate(**kwargs) Creates an iterator that will paginate through responses from "PrometheusService.Client.list_workspaces()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( alias='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **alias** (*string*) -- If this is included, it filters the results to only the workspaces with names that start with the value that you specify here. Amazon Managed Service for Prometheus will automatically strip any blank spaces from the beginning and end of the alias that you specify. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'workspaces': [ { 'alias': 'string', 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'kmsKeyArn': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'workspaceId': 'string' }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* Represents the output of a "ListWorkspaces" operation. * **workspaces** *(list) --* An array of "WorkspaceSummary" structures containing information about the workspaces requested. * *(dict) --* The information about one Amazon Managed Service for Prometheus workspace in your account. * **alias** *(string) --* The alias that is assigned to this workspace to help identify it. It does not need to be unique. * **arn** *(string) --* The ARN of the workspace. * **createdAt** *(datetime) --* The date and time that the workspace was created. * **kmsKeyArn** *(string) --* (optional) If the workspace was created with a customer managed KMS key, the ARN for the key used. * **status** *(dict) --* The current status of the workspace. * **statusCode** *(string) --* The current status of the workspace. * **tags** *(dict) --* The list of tag keys and values that are associated with the workspace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. * **workspaceId** *(string) --* The unique ID for the workspace. * **NextToken** *(string) --* A token to resume pagination. PrometheusService / Client / create_rule_groups_namespace create_rule_groups_namespace **************************** PrometheusService.Client.create_rule_groups_namespace(**kwargs) The "CreateRuleGroupsNamespace" operation creates a rule groups namespace within a workspace. A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces. Use this operation only to create new rule groups namespaces. To update an existing rule groups namespace, use "PutRuleGroupsNamespace". See also: AWS API Documentation **Request Syntax** response = client.create_rule_groups_namespace( clientToken='string', data=b'bytes', name='string', tags={ 'string': 'string' }, workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **data** (*bytes*) -- **[REQUIRED]** The rules file to use in the new namespace. Contains the base64-encoded version of the YAML rules file. For details about the rule groups namespace structure, see RuleGroupsNamespaceData. * **name** (*string*) -- **[REQUIRED]** The name for the new rule groups namespace. * **tags** (*dict*) -- The list of tag keys and values to associate with the rule groups namespace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to add the rule groups namespace. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'name': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' }, 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* Represents the output of a "CreateRuleGroupsNamespace" operation. * **arn** *(string) --* The Amazon Resource Name (ARN) of the new rule groups namespace. * **name** *(string) --* The name of the new rule groups namespace. * **status** *(dict) --* A structure that returns the current status of the rule groups namespace. * **statusCode** *(string) --* The current status of the namespace. * **statusReason** *(string) --* The reason for the failure, if any. * **tags** *(dict) --* The list of tag keys and values that are associated with the namespace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / delete_query_logging_configuration delete_query_logging_configuration ********************************** PrometheusService.Client.delete_query_logging_configuration(**kwargs) Deletes the query logging configuration for the specified workspace. See also: AWS API Documentation **Request Syntax** response = client.delete_query_logging_configuration( clientToken='string', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- (Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request. This field is autopopulated if not provided. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace from which to delete the query logging configuration. Returns: None **Exceptions** * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / list_scrapers list_scrapers ************* PrometheusService.Client.list_scrapers(**kwargs) The "ListScrapers" operation lists all of the scrapers in your account. This includes scrapers being created or deleted. You can optionally filter the returned list. See also: AWS API Documentation **Request Syntax** response = client.list_scrapers( filters={ 'string': [ 'string', ] }, maxResults=123, nextToken='string' ) Parameters: * **filters** (*dict*) -- (Optional) A list of key-value pairs to filter the list of scrapers returned. Keys include "status", "sourceArn", "destinationArn", and "alias". Filters on the same key are "OR"'d together, and filters on different keys are "AND"'d together. For example, "status=ACTIVE&status=CREATING&alias=Test", will return all scrapers that have the alias Test, and are either in status ACTIVE or CREATING. To find all active scrapers that are sending metrics to a specific Amazon Managed Service for Prometheus workspace, you would use the ARN of the workspace in a query: "status=ACTIVE&destinationArn=arn:aws:aps:us- east-1:123456789012:workspace/ws-example1-1234-abcd- 56ef-123456789012" If this is included, it filters the results to only the scrapers that match the filter. * *(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 by which to filter. * *(string) --* The value for a given key by which to filter. * **maxResults** (*integer*) -- Optional) The maximum number of scrapers to return in one "ListScrapers" operation. The range is 1-1000. If you omit this parameter, the default of 100 is used. * **nextToken** (*string*) -- (Optional) The token for the next set of items to return. (You received this token from a previous call.) Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'scrapers': [ { 'alias': 'string', 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'destination': { 'ampConfiguration': { 'workspaceArn': 'string' } }, 'lastModifiedAt': datetime(2015, 1, 1), 'roleArn': 'string', 'roleConfiguration': { 'sourceRoleArn': 'string', 'targetRoleArn': 'string' }, 'scraperId': 'string', 'source': { 'eksConfiguration': { 'clusterArn': 'string', 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } }, 'status': { 'statusCode': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED'|'DELETION_FAILED' }, 'statusReason': 'string', 'tags': { 'string': 'string' } }, ] } **Response Structure** * *(dict) --* Represents the output of a "ListScrapers" operation. * **nextToken** *(string) --* A token indicating that there are more results to retrieve. You can use this token as part of your next "ListScrapers" operation to retrieve those results. * **scrapers** *(list) --* A list of "ScraperSummary" structures giving information about scrapers in the account that match the filters provided. * *(dict) --* The "ScraperSummary" structure contains a summary of the details about one scraper in your account. * **alias** *(string) --* (Optional) A name associated with the scraper. * **arn** *(string) --* The Amazon Resource Name (ARN) of the scraper. * **createdAt** *(datetime) --* The date and time that the scraper was created. * **destination** *(dict) --* The Amazon Managed Service for Prometheus workspace the scraper sends metrics to. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "ampConfiguration". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **ampConfiguration** *(dict) --* The Amazon Managed Service for Prometheus workspace to send metrics to. * **workspaceArn** *(string) --* ARN of the Amazon Managed Service for Prometheus workspace. * **lastModifiedAt** *(datetime) --* The date and time that the scraper was last modified. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover and collect metrics on your behalf. * **roleConfiguration** *(dict) --* This structure displays information about the IAM roles used for cross-account scraping configuration. * **sourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the source account to enable cross-account scraping. For information about the contents of this policy, see Cross-account setup. * **targetRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the target account to enable cross-account scraping. For information about the contents of this policy, see Cross-account setup. * **scraperId** *(string) --* The ID of the scraper. * **source** *(dict) --* The Amazon EKS cluster from which the scraper collects metrics. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "eksConfiguration". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **eksConfiguration** *(dict) --* The Amazon EKS cluster from which a scraper collects metrics. * **clusterArn** *(string) --* ARN of the Amazon EKS cluster. * **securityGroupIds** *(list) --* A list of the security group IDs for the Amazon EKS cluster VPC configuration. * *(string) --* ID of a VPC security group. * **subnetIds** *(list) --* A list of subnet IDs for the Amazon EKS cluster VPC configuration. * *(string) --* ID of a VPC subnet. * **status** *(dict) --* A structure that contains the current status of the scraper. * **statusCode** *(string) --* The current status of the scraper. * **statusReason** *(string) --* If there is a failure, the reason for the failure. * **tags** *(dict) --* (Optional) The list of tag keys and values associated with the scraper. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / get_paginator get_paginator ************* PrometheusService.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. PrometheusService / Client / put_alert_manager_definition put_alert_manager_definition **************************** PrometheusService.Client.put_alert_manager_definition(**kwargs) Updates an existing alert manager definition in a workspace. If the workspace does not already have an alert manager definition, don't use this operation to create it. Instead, use "CreateAlertManagerDefinition". See also: AWS API Documentation **Request Syntax** response = client.put_alert_manager_definition( clientToken='string', data=b'bytes', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **data** (*bytes*) -- **[REQUIRED]** The alert manager definition to use. A base64-encoded version of the YAML alert manager definition file. For details about the alert manager definition, see AlertManagedDefinitionData. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to update the alert manager definition in. Return type: dict Returns: **Response Syntax** { 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' } } **Response Structure** * *(dict) --* Represents the output of a "PutAlertManagerDefinition" operation. * **status** *(dict) --* A structure that returns the current status of the alert manager definition. * **statusCode** *(string) --* The current status of the alert manager. * **statusReason** *(string) --* If there is a failure, the reason for the failure. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / describe_logging_configuration describe_logging_configuration ****************************** PrometheusService.Client.describe_logging_configuration(**kwargs) Returns complete information about the current rules and alerting logging configuration of the workspace. Note: These logging configurations are only for rules and alerting logs. See also: AWS API Documentation **Request Syntax** response = client.describe_logging_configuration( workspaceId='string' ) Parameters: **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to describe the logging configuration for. Return type: dict Returns: **Response Syntax** { 'loggingConfiguration': { 'createdAt': datetime(2015, 1, 1), 'logGroupArn': 'string', 'modifiedAt': datetime(2015, 1, 1), 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' }, 'workspace': 'string' } } **Response Structure** * *(dict) --* Represents the output of a "DescribeLoggingConfiguration" operation. * **loggingConfiguration** *(dict) --* A structure that displays the information about the logging configuration. * **createdAt** *(datetime) --* The date and time that the logging configuration was created. * **logGroupArn** *(string) --* The ARN of the CloudWatch log group to which the vended log data will be published. * **modifiedAt** *(datetime) --* The date and time that the logging configuration was most recently changed. * **status** *(dict) --* The current status of the logging configuration. * **statusCode** *(string) --* The current status of the current rules and alerting logging configuration. Note: These logging configurations are only for rules and alerting logs. * **statusReason** *(string) --* If failed, the reason for the failure. * **workspace** *(string) --* The ID of the workspace the logging configuration is for. **Exceptions** * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / list_rule_groups_namespaces list_rule_groups_namespaces *************************** PrometheusService.Client.list_rule_groups_namespaces(**kwargs) Returns a list of rule groups namespaces in a workspace. See also: AWS API Documentation **Request Syntax** response = client.list_rule_groups_namespaces( maxResults=123, name='string', nextToken='string', workspaceId='string' ) Parameters: * **maxResults** (*integer*) -- The maximum number of results to return. The default is 100. * **name** (*string*) -- Use this parameter to filter the rule groups namespaces that are returned. Only the namespaces with names that begin with the value that you specify are returned. * **nextToken** (*string*) -- The token for the next set of items to return. You receive this token from a previous call, and use it to get the next page of results. The other parameters must be the same as the initial call. For example, if your initial request has "maxResults" of 10, and there are 12 rule groups namespaces to return, then your initial request will return 10 and a "nextToken". Using the next token in a subsequent call will return the remaining 2 namespaces. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace containing the rule groups namespaces. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'ruleGroupsNamespaces': [ { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'modifiedAt': datetime(2015, 1, 1), 'name': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' }, 'tags': { 'string': 'string' } }, ] } **Response Structure** * *(dict) --* Represents the output of a "ListRuleGroupsNamespaces" operation. * **nextToken** *(string) --* A token indicating that there are more results to retrieve. You can use this token as part of your next "ListRuleGroupsNamespaces" request to retrieve those results. * **ruleGroupsNamespaces** *(list) --* The returned list of rule groups namespaces. * *(dict) --* The high-level information about a rule groups namespace. To retrieve more information, use "DescribeRuleGroupsNamespace". * **arn** *(string) --* The ARN of the rule groups namespace. * **createdAt** *(datetime) --* The date and time that the rule groups namespace was created. * **modifiedAt** *(datetime) --* The date and time that the rule groups namespace was most recently changed. * **name** *(string) --* The name of the rule groups namespace. * **status** *(dict) --* A structure that displays the current status of the rule groups namespace. * **statusCode** *(string) --* The current status of the namespace. * **statusReason** *(string) --* The reason for the failure, if any. * **tags** *(dict) --* The list of tag keys and values that are associated with the rule groups namespace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / can_paginate can_paginate ************ PrometheusService.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "create_foo", and you'd normally invoke the operation as "client.create_foo(**kwargs)", if the "create_foo" operation can be paginated, you can use the call "client.get_paginator("create_foo")". Returns: "True" if the operation can be paginated, "False" otherwise. PrometheusService / Client / create_query_logging_configuration create_query_logging_configuration ********************************** PrometheusService.Client.create_query_logging_configuration(**kwargs) Creates a query logging configuration for the specified workspace. This operation enables logging of queries that exceed the specified QSP threshold. See also: AWS API Documentation **Request Syntax** response = client.create_query_logging_configuration( clientToken='string', destinations=[ { 'cloudWatchLogs': { 'logGroupArn': 'string' }, 'filters': { 'qspThreshold': 123 } }, ], workspaceId='string' ) Parameters: * **clientToken** (*string*) -- (Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request. This field is autopopulated if not provided. * **destinations** (*list*) -- **[REQUIRED]** The destinations where query logs will be sent. Only CloudWatch Logs destination is supported. The list must contain exactly one element. * *(dict) --* Defines a destination and its associated filtering criteria for query logging. * **cloudWatchLogs** *(dict) --* **[REQUIRED]** Configuration details for logging to CloudWatch Logs. * **logGroupArn** *(string) --* **[REQUIRED]** The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation. * **filters** *(dict) --* **[REQUIRED]** Filtering criteria that determine which queries are logged. * **qspThreshold** *(integer) --* **[REQUIRED]** The Query Samples Processed (QSP) threshold above which queries will be logged. Queries processing more samples than this threshold will be captured in logs. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace for which to create the query logging configuration. Return type: dict Returns: **Response Syntax** { 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' } } **Response Structure** * *(dict) --* * **status** *(dict) --* The current status of the query logging configuration. * **statusCode** *(string) --* The current status of the query logging configuration. * **statusReason** *(string) --* If there is a failure, the reason for the failure. **Exceptions** * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / describe_scraper describe_scraper **************** PrometheusService.Client.describe_scraper(**kwargs) The "DescribeScraper" operation displays information about an existing scraper. See also: AWS API Documentation **Request Syntax** response = client.describe_scraper( scraperId='string' ) Parameters: **scraperId** (*string*) -- **[REQUIRED]** The ID of the scraper to describe. Return type: dict Returns: **Response Syntax** { 'scraper': { 'alias': 'string', 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'destination': { 'ampConfiguration': { 'workspaceArn': 'string' } }, 'lastModifiedAt': datetime(2015, 1, 1), 'roleArn': 'string', 'roleConfiguration': { 'sourceRoleArn': 'string', 'targetRoleArn': 'string' }, 'scrapeConfiguration': { 'configurationBlob': b'bytes' }, 'scraperId': 'string', 'source': { 'eksConfiguration': { 'clusterArn': 'string', 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } }, 'status': { 'statusCode': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED'|'DELETION_FAILED' }, 'statusReason': 'string', 'tags': { 'string': 'string' } } } **Response Structure** * *(dict) --* Represents the output of a "DescribeScraper" operation. * **scraper** *(dict) --* Contains details about the scraper. * **alias** *(string) --* (Optional) A name associated with the scraper. * **arn** *(string) --* The Amazon Resource Name (ARN) of the scraper. For example, "arn:aws:aps::123456798012:scraper/s-exa mple1-1234-abcd-5678-ef9012abcd34". * **createdAt** *(datetime) --* The date and time that the scraper was created. * **destination** *(dict) --* The Amazon Managed Service for Prometheus workspace the scraper sends metrics to. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "ampConfiguration". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **ampConfiguration** *(dict) --* The Amazon Managed Service for Prometheus workspace to send metrics to. * **workspaceArn** *(string) --* ARN of the Amazon Managed Service for Prometheus workspace. * **lastModifiedAt** *(datetime) --* The date and time that the scraper was last modified. * **roleArn** *(string) --* The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover and collect metrics on your behalf. For example, "arn:aws:iam::123456789012:role/service-role /AmazonGrafanaServiceRole-12example". * **roleConfiguration** *(dict) --* This structure displays information about the IAM roles used for cross-account scraping configuration. * **sourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the source account to enable cross-account scraping. For information about the contents of this policy, see Cross-account setup. * **targetRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the target account to enable cross-account scraping. For information about the contents of this policy, see Cross-account setup. * **scrapeConfiguration** *(dict) --* The configuration in use by the scraper. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "configurationBlob". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **configurationBlob** *(bytes) --* The base 64 encoded scrape configuration file. * **scraperId** *(string) --* The ID of the scraper. For example, "s-example1-1234-abcd-5678-ef9012abcd34". * **source** *(dict) --* The Amazon EKS cluster from which the scraper collects metrics. Note: This is a Tagged Union structure. Only one of the following top level keys will be set: "eksConfiguration". If a client receives an unknown member it will set "SDK_UNKNOWN_MEMBER" as the top level key, which maps to the name or tag of the unknown member. The structure of "SDK_UNKNOWN_MEMBER" is as follows: 'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'} * **eksConfiguration** *(dict) --* The Amazon EKS cluster from which a scraper collects metrics. * **clusterArn** *(string) --* ARN of the Amazon EKS cluster. * **securityGroupIds** *(list) --* A list of the security group IDs for the Amazon EKS cluster VPC configuration. * *(string) --* ID of a VPC security group. * **subnetIds** *(list) --* A list of subnet IDs for the Amazon EKS cluster VPC configuration. * *(string) --* ID of a VPC subnet. * **status** *(dict) --* A structure that contains the current status of the scraper. * **statusCode** *(string) --* The current status of the scraper. * **statusReason** *(string) --* If there is a failure, the reason for the failure. * **tags** *(dict) --* (Optional) The list of tag keys and values associated with the scraper. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / delete_workspace delete_workspace **************** PrometheusService.Client.delete_workspace(**kwargs) Deletes an existing workspace. Note: When you delete a workspace, the data that has been ingested into it is not immediately deleted. It will be permanently deleted within one month. See also: AWS API Documentation **Request Syntax** response = client.delete_workspace( clientToken='string', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to delete. Returns: None **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / create_alert_manager_definition create_alert_manager_definition ******************************* PrometheusService.Client.create_alert_manager_definition(**kwargs) The "CreateAlertManagerDefinition" operation creates the alert manager definition in a workspace. If a workspace already has an alert manager definition, don't use this operation to update it. Instead, use "PutAlertManagerDefinition". See also: AWS API Documentation **Request Syntax** response = client.create_alert_manager_definition( clientToken='string', data=b'bytes', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **data** (*bytes*) -- **[REQUIRED]** The alert manager definition to add. A base64-encoded version of the YAML alert manager definition file. For details about the alert manager definition, see AlertManagedDefinitionData. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to add the alert manager definition to. Return type: dict Returns: **Response Syntax** { 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' } } **Response Structure** * *(dict) --* Represents the output of a "CreateAlertManagerDefinition" operation. * **status** *(dict) --* A structure that displays the current status of the alert manager definition. * **statusCode** *(string) --* The current status of the alert manager. * **statusReason** *(string) --* If there is a failure, the reason for the failure. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / create_workspace create_workspace **************** PrometheusService.Client.create_workspace(**kwargs) Creates a Prometheus workspace. A workspace is a logical space dedicated to the storage and querying of Prometheus metrics. You can have one or more workspaces in each Region in your account. See also: AWS API Documentation **Request Syntax** response = client.create_workspace( alias='string', clientToken='string', kmsKeyArn='string', tags={ 'string': 'string' } ) Parameters: * **alias** (*string*) -- An alias that you assign to this workspace to help you identify it. It does not need to be unique. Blank spaces at the beginning or end of the alias that you specify will be trimmed from the value used. * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **kmsKeyArn** (*string*) -- (optional) The ARN for a customer managed KMS key to use for encrypting data within your workspace. For more information about using your own key in your workspace, see Encryption at rest in the *Amazon Managed Service for Prometheus User Guide*. * **tags** (*dict*) -- The list of tag keys and values to associate with the workspace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'kmsKeyArn': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'workspaceId': 'string' } **Response Structure** * *(dict) --* Represents the output of a "CreateWorkspace" operation. * **arn** *(string) --* The ARN for the new workspace. * **kmsKeyArn** *(string) --* (optional) If the workspace was created with a customer managed KMS key, the ARN for the key used. * **status** *(dict) --* The current status of the new workspace. Immediately after you create the workspace, the status is usually "CREATING". * **statusCode** *(string) --* The current status of the workspace. * **tags** *(dict) --* The list of tag keys and values that are associated with the workspace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. * **workspaceId** *(string) --* The unique ID for the new workspace. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / list_tags_for_resource list_tags_for_resource ********************** PrometheusService.Client.list_tags_for_resource(**kwargs) The "ListTagsForResource" operation returns the tags that are associated with an Amazon Managed Service for Prometheus resource. Currently, the only resources that can be tagged are scrapers, workspaces, and rule groups namespaces. See also: AWS API Documentation **Request Syntax** response = client.list_tags_for_resource( resourceArn='string' ) Parameters: **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to list tages for. Must be a workspace, scraper, or rule groups namespace resource. Return type: dict Returns: **Response Syntax** { 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **tags** *(dict) --* The list of tag keys and values associated with the resource. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / untag_resource untag_resource ************** PrometheusService.Client.untag_resource(**kwargs) Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are rule groups namespaces, scrapers, and workspaces. See also: AWS API Documentation **Request Syntax** response = client.untag_resource( resourceArn='string', tagKeys=[ 'string', ] ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource from which to remove a tag. * **tagKeys** (*list*) -- **[REQUIRED]** The keys of the tags to remove. * *(string) --* Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / describe_workspace_configuration describe_workspace_configuration ******************************** PrometheusService.Client.describe_workspace_configuration(**kwargs) Use this operation to return information about the configuration of a workspace. The configuration details returned include workspace configuration status, label set limits, and retention period. See also: AWS API Documentation **Request Syntax** response = client.describe_workspace_configuration( workspaceId='string' ) Parameters: **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace that you want to retrieve information for. To find the IDs of your workspaces, use the ListWorkspaces operation. Return type: dict Returns: **Response Syntax** { 'workspaceConfiguration': { 'limitsPerLabelSet': [ { 'labelSet': { 'string': 'string' }, 'limits': { 'maxSeries': 123 } }, ], 'retentionPeriodInDays': 123, 'status': { 'statusCode': 'ACTIVE'|'UPDATING'|'UPDATE_FAILED', 'statusReason': 'string' } } } **Response Structure** * *(dict) --* * **workspaceConfiguration** *(dict) --* This structure contains the information about the workspace configuration. * **limitsPerLabelSet** *(list) --* This is an array of structures, where each structure displays one label sets for the workspace and the limits for that label set. * *(dict) --* This structure defines one label set used to enforce active time series limits for the workspace, and defines the limit for that label set. A label set is a unique combination of label-value pairs. Use them to control time series limits and to monitor usage by specific label groups. Example label sets might be "team:finance" or "env:prod" * **labelSet** *(dict) --* This defines one label set that will have an enforced active time series limit. Label values accept ASCII characters and must contain at least one character that isn't whitespace. ASCII control characters are not accepted. If the label name is metric name label "__name__", then the *metric* part of the name must conform to the following pattern: "[a-zA-Z_:][a-zA-Z0-9_:]*" * *(string) --* * *(string) --* * **limits** *(dict) --* This structure contains the information about the limits that apply to time series that match this label set. * **maxSeries** *(integer) --* The maximum number of active series that can be ingested that match this label set. Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed Service for Prometheus to vend label set metrics to CloudWatch * **retentionPeriodInDays** *(integer) --* This field displays how many days that metrics are retained in the workspace. * **status** *(dict) --* This structure displays the current status of the workspace configuration, and might also contain a reason for that status. * **statusCode** *(string) --* The current status of the workspace configuration. * **statusReason** *(string) --* The reason for the current status, if a reason is available. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / get_waiter get_waiter ********** PrometheusService.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" PrometheusService / Client / delete_rule_groups_namespace delete_rule_groups_namespace **************************** PrometheusService.Client.delete_rule_groups_namespace(**kwargs) Deletes one rule groups namespace and its associated rule groups definition. See also: AWS API Documentation **Request Syntax** response = client.delete_rule_groups_namespace( clientToken='string', name='string', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **name** (*string*) -- **[REQUIRED]** The name of the rule groups namespace to delete. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace containing the rule groups namespace and definition to delete. Returns: None **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / list_workspaces list_workspaces *************** PrometheusService.Client.list_workspaces(**kwargs) Lists all of the Amazon Managed Service for Prometheus workspaces in your account. This includes workspaces being created or deleted. See also: AWS API Documentation **Request Syntax** response = client.list_workspaces( alias='string', maxResults=123, nextToken='string' ) Parameters: * **alias** (*string*) -- If this is included, it filters the results to only the workspaces with names that start with the value that you specify here. Amazon Managed Service for Prometheus will automatically strip any blank spaces from the beginning and end of the alias that you specify. * **maxResults** (*integer*) -- The maximum number of workspaces to return per request. The default is 100. * **nextToken** (*string*) -- The token for the next set of items to return. You receive this token from a previous call, and use it to get the next page of results. The other parameters must be the same as the initial call. For example, if your initial request has "maxResults" of 10, and there are 12 workspaces to return, then your initial request will return 10 and a "nextToken". Using the next token in a subsequent call will return the remaining 2 workspaces. Return type: dict Returns: **Response Syntax** { 'nextToken': 'string', 'workspaces': [ { 'alias': 'string', 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'kmsKeyArn': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'workspaceId': 'string' }, ] } **Response Structure** * *(dict) --* Represents the output of a "ListWorkspaces" operation. * **nextToken** *(string) --* A token indicating that there are more results to retrieve. You can use this token as part of your next "ListWorkspaces" request to retrieve those results. * **workspaces** *(list) --* An array of "WorkspaceSummary" structures containing information about the workspaces requested. * *(dict) --* The information about one Amazon Managed Service for Prometheus workspace in your account. * **alias** *(string) --* The alias that is assigned to this workspace to help identify it. It does not need to be unique. * **arn** *(string) --* The ARN of the workspace. * **createdAt** *(datetime) --* The date and time that the workspace was created. * **kmsKeyArn** *(string) --* (optional) If the workspace was created with a customer managed KMS key, the ARN for the key used. * **status** *(dict) --* The current status of the workspace. * **statusCode** *(string) --* The current status of the workspace. * **tags** *(dict) --* The list of tag keys and values that are associated with the workspace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. * **workspaceId** *(string) --* The unique ID for the workspace. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / create_logging_configuration create_logging_configuration **************************** PrometheusService.Client.create_logging_configuration(**kwargs) The "CreateLoggingConfiguration" operation creates rules and alerting logging configuration for the workspace. Use this operation to set the CloudWatch log group to which the logs will be published to. Note: These logging configurations are only for rules and alerting logs. See also: AWS API Documentation **Request Syntax** response = client.create_logging_configuration( clientToken='string', logGroupArn='string', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **logGroupArn** (*string*) -- **[REQUIRED]** The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to create the logging configuration for. Return type: dict Returns: **Response Syntax** { 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' } } **Response Structure** * *(dict) --* Represents the output of a "CreateLoggingConfiguration" operation. * **status** *(dict) --* A structure that displays the current status of the logging configuration. * **statusCode** *(string) --* The current status of the current rules and alerting logging configuration. Note: These logging configurations are only for rules and alerting logs. * **statusReason** *(string) --* If failed, the reason for the failure. **Exceptions** * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / update_workspace_alias update_workspace_alias ********************** PrometheusService.Client.update_workspace_alias(**kwargs) Updates the alias of an existing workspace. See also: AWS API Documentation **Request Syntax** response = client.update_workspace_alias( alias='string', clientToken='string', workspaceId='string' ) Parameters: * **alias** (*string*) -- The new alias for the workspace. It does not need to be unique. Amazon Managed Service for Prometheus will automatically strip any blank spaces from the beginning and end of the alias that you specify. * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to update. Returns: None **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / describe_rule_groups_namespace describe_rule_groups_namespace ****************************** PrometheusService.Client.describe_rule_groups_namespace(**kwargs) Returns complete information about one rule groups namespace. To retrieve a list of rule groups namespaces, use "ListRuleGroupsNamespaces". See also: AWS API Documentation **Request Syntax** response = client.describe_rule_groups_namespace( name='string', workspaceId='string' ) Parameters: * **name** (*string*) -- **[REQUIRED]** The name of the rule groups namespace that you want information for. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace containing the rule groups namespace. Return type: dict Returns: **Response Syntax** { 'ruleGroupsNamespace': { 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'data': b'bytes', 'modifiedAt': datetime(2015, 1, 1), 'name': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' }, 'tags': { 'string': 'string' } } } **Response Structure** * *(dict) --* Represents the output of a "DescribeRuleGroupsNamespace" operation. * **ruleGroupsNamespace** *(dict) --* The information about the rule groups namespace. * **arn** *(string) --* The ARN of the rule groups namespace. For example, "arn:aws:aps::123456789012:rulegroupsnamespace/ws- example1-1234-abcd-5678-ef90abcd1234/rulesfile1". * **createdAt** *(datetime) --* The date and time that the rule groups namespace was created. * **data** *(bytes) --* The rule groups file used in the namespace. For details about the rule groups namespace structure, see RuleGroupsNamespaceData. * **modifiedAt** *(datetime) --* The date and time that the rule groups namespace was most recently changed. * **name** *(string) --* The name of the rule groups namespace. * **status** *(dict) --* The current status of the rule groups namespace. * **statusCode** *(string) --* The current status of the namespace. * **statusReason** *(string) --* The reason for the failure, if any. * **tags** *(dict) --* The list of tag keys and values that are associated with the rule groups namespace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / describe_alert_manager_definition describe_alert_manager_definition ********************************* PrometheusService.Client.describe_alert_manager_definition(**kwargs) Retrieves the full information about the alert manager definition for a workspace. See also: AWS API Documentation **Request Syntax** response = client.describe_alert_manager_definition( workspaceId='string' ) Parameters: **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to retrieve the alert manager definition from. Return type: dict Returns: **Response Syntax** { 'alertManagerDefinition': { 'createdAt': datetime(2015, 1, 1), 'data': b'bytes', 'modifiedAt': datetime(2015, 1, 1), 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' } } } **Response Structure** * *(dict) --* Represents the output of a "DescribeAlertManagerDefinition" operation. * **alertManagerDefinition** *(dict) --* The alert manager definition. * **createdAt** *(datetime) --* The date and time that the alert manager definition was created. * **data** *(bytes) --* The actual alert manager definition. For details about the alert manager definition, see AlertManagedDefinitionData. * **modifiedAt** *(datetime) --* The date and time that the alert manager definition was most recently changed. * **status** *(dict) --* A structure that displays the current status of the alert manager definition.. * **statusCode** *(string) --* The current status of the alert manager. * **statusReason** *(string) --* If there is a failure, the reason for the failure. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / close close ***** PrometheusService.Client.close() Closes underlying endpoint connections. PrometheusService / Client / describe_query_logging_configuration describe_query_logging_configuration ************************************ PrometheusService.Client.describe_query_logging_configuration(**kwargs) Retrieves the details of the query logging configuration for the specified workspace. See also: AWS API Documentation **Request Syntax** response = client.describe_query_logging_configuration( workspaceId='string' ) Parameters: **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace for which to retrieve the query logging configuration. Return type: dict Returns: **Response Syntax** { 'queryLoggingConfiguration': { 'createdAt': datetime(2015, 1, 1), 'destinations': [ { 'cloudWatchLogs': { 'logGroupArn': 'string' }, 'filters': { 'qspThreshold': 123 } }, ], 'modifiedAt': datetime(2015, 1, 1), 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' }, 'workspace': 'string' } } **Response Structure** * *(dict) --* * **queryLoggingConfiguration** *(dict) --* The detailed information about the query logging configuration for the specified workspace. * **createdAt** *(datetime) --* The date and time when the query logging configuration was created. * **destinations** *(list) --* The configured destinations for the query logging configuration. * *(dict) --* Defines a destination and its associated filtering criteria for query logging. * **cloudWatchLogs** *(dict) --* Configuration details for logging to CloudWatch Logs. * **logGroupArn** *(string) --* The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation. * **filters** *(dict) --* Filtering criteria that determine which queries are logged. * **qspThreshold** *(integer) --* The Query Samples Processed (QSP) threshold above which queries will be logged. Queries processing more samples than this threshold will be captured in logs. * **modifiedAt** *(datetime) --* The date and time when the query logging configuration was last modified. * **status** *(dict) --* The current status of the query logging configuration. * **statusCode** *(string) --* The current status of the query logging configuration. * **statusReason** *(string) --* If there is a failure, the reason for the failure. * **workspace** *(string) --* The ID of the workspace associated with this query logging configuration. **Exceptions** * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / update_scraper update_scraper ************** PrometheusService.Client.update_scraper(**kwargs) Updates an existing scraper. You can't use this function to update the source from which the scraper is collecting metrics. To change the source, delete the scraper and create a new one. See also: AWS API Documentation **Request Syntax** response = client.update_scraper( alias='string', clientToken='string', destination={ 'ampConfiguration': { 'workspaceArn': 'string' } }, roleConfiguration={ 'sourceRoleArn': 'string', 'targetRoleArn': 'string' }, scrapeConfiguration={ 'configurationBlob': b'bytes' }, scraperId='string' ) Parameters: * **alias** (*string*) -- The new alias of the scraper. * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **destination** (*dict*) -- The new Amazon Managed Service for Prometheus workspace to send metrics to. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "ampConfiguration". * **ampConfiguration** *(dict) --* The Amazon Managed Service for Prometheus workspace to send metrics to. * **workspaceArn** *(string) --* **[REQUIRED]** ARN of the Amazon Managed Service for Prometheus workspace. * **roleConfiguration** (*dict*) -- Use this structure to enable cross-account access, so that you can use a target account to access Prometheus metrics from source accounts. * **sourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the source account to enable cross-account scraping. For information about the contents of this policy, see Cross- account setup. * **targetRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the target account to enable cross-account scraping. For information about the contents of this policy, see Cross- account setup. * **scrapeConfiguration** (*dict*) -- Contains the base-64 encoded YAML configuration for the scraper. Note: For more information about configuring a scraper, see Using an Amazon Web Services managed collector in the *Amazon Managed Service for Prometheus User Guide*. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "configurationBlob". * **configurationBlob** *(bytes) --* The base 64 encoded scrape configuration file. * **scraperId** (*string*) -- **[REQUIRED]** The ID of the scraper to update. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'scraperId': 'string', 'status': { 'statusCode': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED'|'DELETION_FAILED' }, 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* * **arn** *(string) --* The Amazon Resource Name (ARN) of the updated scraper. * **scraperId** *(string) --* The ID of the updated scraper. * **status** *(dict) --* A structure that displays the current status of the scraper. * **statusCode** *(string) --* The current status of the scraper. * **tags** *(dict) --* The list of tag keys and values that are associated with the scraper. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / update_logging_configuration update_logging_configuration **************************** PrometheusService.Client.update_logging_configuration(**kwargs) Updates the log group ARN or the workspace ID of the current rules and alerting logging configuration. Note: These logging configurations are only for rules and alerting logs. See also: AWS API Documentation **Request Syntax** response = client.update_logging_configuration( clientToken='string', logGroupArn='string', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **logGroupArn** (*string*) -- **[REQUIRED]** The ARN of the CloudWatch log group to which the vended log data will be published. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to update the logging configuration for. Return type: dict Returns: **Response Syntax** { 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' } } **Response Structure** * *(dict) --* Represents the output of an "UpdateLoggingConfiguration" operation. * **status** *(dict) --* A structure that contains the current status of the logging configuration. * **statusCode** *(string) --* The current status of the current rules and alerting logging configuration. Note: These logging configurations are only for rules and alerting logs. * **statusReason** *(string) --* If failed, the reason for the failure. **Exceptions** * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / delete_scraper delete_scraper ************** PrometheusService.Client.delete_scraper(**kwargs) The "DeleteScraper" operation deletes one scraper, and stops any metrics collection that the scraper performs. See also: AWS API Documentation **Request Syntax** response = client.delete_scraper( clientToken='string', scraperId='string' ) Parameters: * **clientToken** (*string*) -- (Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request. This field is autopopulated if not provided. * **scraperId** (*string*) -- **[REQUIRED]** The ID of the scraper to delete. Return type: dict Returns: **Response Syntax** { 'scraperId': 'string', 'status': { 'statusCode': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED'|'DELETION_FAILED' } } **Response Structure** * *(dict) --* Represents the output of a "DeleteScraper" operation. * **scraperId** *(string) --* The ID of the scraper to delete. * **status** *(dict) --* The current status of the scraper. * **statusCode** *(string) --* The current status of the scraper. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / update_query_logging_configuration update_query_logging_configuration ********************************** PrometheusService.Client.update_query_logging_configuration(**kwargs) Updates the query logging configuration for the specified workspace. See also: AWS API Documentation **Request Syntax** response = client.update_query_logging_configuration( clientToken='string', destinations=[ { 'cloudWatchLogs': { 'logGroupArn': 'string' }, 'filters': { 'qspThreshold': 123 } }, ], workspaceId='string' ) Parameters: * **clientToken** (*string*) -- (Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request. This field is autopopulated if not provided. * **destinations** (*list*) -- **[REQUIRED]** The destinations where query logs will be sent. Only CloudWatch Logs destination is supported. The list must contain exactly one element. * *(dict) --* Defines a destination and its associated filtering criteria for query logging. * **cloudWatchLogs** *(dict) --* **[REQUIRED]** Configuration details for logging to CloudWatch Logs. * **logGroupArn** *(string) --* **[REQUIRED]** The ARN of the CloudWatch log group to which the vended log data will be published. This log group must exist prior to calling this operation. * **filters** *(dict) --* **[REQUIRED]** Filtering criteria that determine which queries are logged. * **qspThreshold** *(integer) --* **[REQUIRED]** The Query Samples Processed (QSP) threshold above which queries will be logged. Queries processing more samples than this threshold will be captured in logs. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace for which to update the query logging configuration. Return type: dict Returns: **Response Syntax** { 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' } } **Response Structure** * *(dict) --* * **status** *(dict) --* The current status of the query logging configuration. * **statusCode** *(string) --* The current status of the query logging configuration. * **statusReason** *(string) --* If there is a failure, the reason for the failure. **Exceptions** * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / update_workspace_configuration update_workspace_configuration ****************************** PrometheusService.Client.update_workspace_configuration(**kwargs) Use this operation to create or update the label sets, label set limits, and retention period of a workspace. You must specify at least one of "limitsPerLabelSet" or "retentionPeriodInDays" for the request to be valid. See also: AWS API Documentation **Request Syntax** response = client.update_workspace_configuration( clientToken='string', limitsPerLabelSet=[ { 'labelSet': { 'string': 'string' }, 'limits': { 'maxSeries': 123 } }, ], retentionPeriodInDays=123, workspaceId='string' ) Parameters: * **clientToken** (*string*) -- You can include a token in your operation to make it an idempotent opeartion. This field is autopopulated if not provided. * **limitsPerLabelSet** (*list*) -- This is an array of structures, where each structure defines a label set for the workspace, and defines the active time series limit for each of those label sets. Each label name in a label set must be unique. * *(dict) --* This structure defines one label set used to enforce active time series limits for the workspace, and defines the limit for that label set. A label set is a unique combination of label-value pairs. Use them to control time series limits and to monitor usage by specific label groups. Example label sets might be "team:finance" or "env:prod" * **labelSet** *(dict) --* **[REQUIRED]** This defines one label set that will have an enforced active time series limit. Label values accept ASCII characters and must contain at least one character that isn't whitespace. ASCII control characters are not accepted. If the label name is metric name label "__name__", then the *metric* part of the name must conform to the following pattern: "[a-zA-Z_:][a-zA-Z0-9_:]*" * *(string) --* * *(string) --* * **limits** *(dict) --* **[REQUIRED]** This structure contains the information about the limits that apply to time series that match this label set. * **maxSeries** *(integer) --* The maximum number of active series that can be ingested that match this label set. Setting this to 0 causes no label set limit to be enforced, but it does cause Amazon Managed Service for Prometheus to vend label set metrics to CloudWatch * **retentionPeriodInDays** (*integer*) -- Specifies how many days that metrics will be retained in the workspace. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace that you want to update. To find the IDs of your workspaces, use the ListWorkspaces operation. Return type: dict Returns: **Response Syntax** { 'status': { 'statusCode': 'ACTIVE'|'UPDATING'|'UPDATE_FAILED', 'statusReason': 'string' } } **Response Structure** * *(dict) --* * **status** *(dict) --* The status of the workspace configuration. * **statusCode** *(string) --* The current status of the workspace configuration. * **statusReason** *(string) --* The reason for the current status, if a reason is available. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / describe_workspace describe_workspace ****************** PrometheusService.Client.describe_workspace(**kwargs) Returns information about an existing workspace. See also: AWS API Documentation **Request Syntax** response = client.describe_workspace( workspaceId='string' ) Parameters: **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to describe. Return type: dict Returns: **Response Syntax** { 'workspace': { 'alias': 'string', 'arn': 'string', 'createdAt': datetime(2015, 1, 1), 'kmsKeyArn': 'string', 'prometheusEndpoint': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED' }, 'tags': { 'string': 'string' }, 'workspaceId': 'string' } } **Response Structure** * *(dict) --* Represents the output of a "DescribeWorkspace" operation. * **workspace** *(dict) --* A structure that contains details about the workspace. * **alias** *(string) --* The alias that is assigned to this workspace to help identify it. It does not need to be unique. * **arn** *(string) --* The ARN of the workspace. For example, "arn:aws:aps::123456789012:workspace/ws- example1-1234-abcd-5678-ef90abcd1234". * **createdAt** *(datetime) --* The date and time that the workspace was created. * **kmsKeyArn** *(string) --* (optional) If the workspace was created with a customer managed KMS key, the ARN for the key used. * **prometheusEndpoint** *(string) --* The Prometheus endpoint available for this workspace. For example, "https://aps- workspaces..amazonaws.com/workspaces/ws- example1-1234-abcd-5678-ef90abcd1234/api/v1/". * **status** *(dict) --* The current status of the workspace. * **statusCode** *(string) --* The current status of the workspace. * **tags** *(dict) --* The list of tag keys and values that are associated with the workspace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. * **workspaceId** *(string) --* The unique ID for the workspace. For example, "ws- example1-1234-abcd-5678-ef90abcd1234". **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / create_scraper create_scraper ************** PrometheusService.Client.create_scraper(**kwargs) The "CreateScraper" operation creates a scraper to collect metrics. A scraper pulls metrics from Prometheus-compatible sources within an Amazon EKS cluster, and sends them to your Amazon Managed Service for Prometheus workspace. Scrapers are flexible, and can be configured to control what metrics are collected, the frequency of collection, what transformations are applied to the metrics, and more. An IAM role will be created for you that Amazon Managed Service for Prometheus uses to access the metrics in your cluster. You must configure this role with a policy that allows it to scrape metrics from your cluster. For more information, see Configuring your Amazon EKS cluster in the *Amazon Managed Service for Prometheus User Guide*. The "scrapeConfiguration" parameter contains the base-64 encoded YAML configuration for the scraper. When creating a scraper, the service creates a "Network Interface" in each **Availability Zone** that are passed into "CreateScraper" through subnets. These network interfaces are used to connect to the Amazon EKS cluster within the VPC for scraping metrics. Note: For more information about collectors, including what metrics are collected, and how to configure the scraper, see Using an Amazon Web Services managed collector in the *Amazon Managed Service for Prometheus User Guide*. See also: AWS API Documentation **Request Syntax** response = client.create_scraper( alias='string', clientToken='string', destination={ 'ampConfiguration': { 'workspaceArn': 'string' } }, roleConfiguration={ 'sourceRoleArn': 'string', 'targetRoleArn': 'string' }, scrapeConfiguration={ 'configurationBlob': b'bytes' }, source={ 'eksConfiguration': { 'clusterArn': 'string', 'securityGroupIds': [ 'string', ], 'subnetIds': [ 'string', ] } }, tags={ 'string': 'string' } ) Parameters: * **alias** (*string*) -- (optional) An alias to associate with the scraper. This is for your use, and does not need to be unique. * **clientToken** (*string*) -- (Optional) A unique, case-sensitive identifier that you can provide to ensure the idempotency of the request. This field is autopopulated if not provided. * **destination** (*dict*) -- **[REQUIRED]** The Amazon Managed Service for Prometheus workspace to send metrics to. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "ampConfiguration". * **ampConfiguration** *(dict) --* The Amazon Managed Service for Prometheus workspace to send metrics to. * **workspaceArn** *(string) --* **[REQUIRED]** ARN of the Amazon Managed Service for Prometheus workspace. * **roleConfiguration** (*dict*) -- Use this structure to enable cross-account access, so that you can use a target account to access Prometheus metrics from source accounts. * **sourceRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the source account to enable cross-account scraping. For information about the contents of this policy, see Cross- account setup. * **targetRoleArn** *(string) --* The Amazon Resource Name (ARN) of the role used in the target account to enable cross-account scraping. For information about the contents of this policy, see Cross- account setup. * **scrapeConfiguration** (*dict*) -- **[REQUIRED]** The configuration file to use in the new scraper. For more information, see Scraper configuration in the *Amazon Managed Service for Prometheus User Guide*. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "configurationBlob". * **configurationBlob** *(bytes) --* The base 64 encoded scrape configuration file. * **source** (*dict*) -- **[REQUIRED]** The Amazon EKS cluster from which the scraper will collect metrics. Note: This is a Tagged Union structure. Only one of the following top level keys can be set: "eksConfiguration". * **eksConfiguration** *(dict) --* The Amazon EKS cluster from which a scraper collects metrics. * **clusterArn** *(string) --* **[REQUIRED]** ARN of the Amazon EKS cluster. * **securityGroupIds** *(list) --* A list of the security group IDs for the Amazon EKS cluster VPC configuration. * *(string) --* ID of a VPC security group. * **subnetIds** *(list) --* **[REQUIRED]** A list of subnet IDs for the Amazon EKS cluster VPC configuration. * *(string) --* ID of a VPC subnet. * **tags** (*dict*) -- (Optional) The list of tag keys and values to associate with the scraper. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'scraperId': 'string', 'status': { 'statusCode': 'CREATING'|'UPDATING'|'ACTIVE'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED'|'DELETION_FAILED' }, 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* Represents the output of a "CreateScraper" operation. * **arn** *(string) --* The Amazon Resource Name (ARN) of the new scraper. * **scraperId** *(string) --* The ID of the new scraper. * **status** *(dict) --* A structure that displays the current status of the scraper. * **statusCode** *(string) --* The current status of the scraper. * **tags** *(dict) --* The list of tag keys and values that are associated with the scraper. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / delete_alert_manager_definition delete_alert_manager_definition ******************************* PrometheusService.Client.delete_alert_manager_definition(**kwargs) Deletes the alert manager definition from a workspace. See also: AWS API Documentation **Request Syntax** response = client.delete_alert_manager_definition( clientToken='string', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace to delete the alert manager definition from. Returns: None **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / put_rule_groups_namespace put_rule_groups_namespace ************************* PrometheusService.Client.put_rule_groups_namespace(**kwargs) Updates an existing rule groups namespace within a workspace. A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces. Use this operation only to update existing rule groups namespaces. To create a new rule groups namespace, use "CreateRuleGroupsNamespace". You can't use this operation to add tags to an existing rule groups namespace. Instead, use "TagResource". See also: AWS API Documentation **Request Syntax** response = client.put_rule_groups_namespace( clientToken='string', data=b'bytes', name='string', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **data** (*bytes*) -- **[REQUIRED]** The new rules file to use in the namespace. A base64-encoded version of the YAML rule groups file. For details about the rule groups namespace structure, see RuleGroupsNamespaceData. * **name** (*string*) -- **[REQUIRED]** The name of the rule groups namespace that you are updating. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace where you are updating the rule groups namespace. Return type: dict Returns: **Response Syntax** { 'arn': 'string', 'name': 'string', 'status': { 'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED', 'statusReason': 'string' }, 'tags': { 'string': 'string' } } **Response Structure** * *(dict) --* Represents the output of a "PutRuleGroupsNamespace" operation. * **arn** *(string) --* The ARN of the rule groups namespace. * **name** *(string) --* The name of the rule groups namespace that was updated. * **status** *(dict) --* A structure that includes the current status of the rule groups namespace. * **statusCode** *(string) --* The current status of the namespace. * **statusReason** *(string) --* The reason for the failure, if any. * **tags** *(dict) --* The list of tag keys and values that are associated with the namespace. * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" * "PrometheusService.Client.exceptions.ServiceQuotaExceededExcepti on" PrometheusService / Client / tag_resource tag_resource ************ PrometheusService.Client.tag_resource(**kwargs) The "TagResource" operation associates tags with an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are rule groups namespaces, scrapers, and workspaces. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag. To remove a tag, use "UntagResource". See also: AWS API Documentation **Request Syntax** response = client.tag_resource( resourceArn='string', tags={ 'string': 'string' } ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The ARN of the resource to apply tags to. * **tags** (*dict*) -- **[REQUIRED]** The list of tag keys and values to associate with the resource. Keys must not begin with "aws:". * *(string) --* The key of the tag. Must not begin with "aws:". * *(string) --* The value of the tag. Return type: dict Returns: **Response Syntax** {} **Response Structure** * *(dict) --* **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / get_default_scraper_configuration get_default_scraper_configuration ********************************* PrometheusService.Client.get_default_scraper_configuration() The "GetDefaultScraperConfiguration" operation returns the default scraper configuration used when Amazon EKS creates a scraper for you. See also: AWS API Documentation **Request Syntax** response = client.get_default_scraper_configuration() Return type: dict Returns: **Response Syntax** { 'configuration': b'bytes' } **Response Structure** * *(dict) --* Represents the output of a "GetDefaultScraperConfiguration" operation. * **configuration** *(bytes) --* The configuration file. Base 64 encoded. For more information, see >>`<`__in the *Amazon Managed Service for Prometheus User Guide*. **Exceptions** * "PrometheusService.Client.exceptions.ThrottlingException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException" PrometheusService / Client / delete_logging_configuration delete_logging_configuration **************************** PrometheusService.Client.delete_logging_configuration(**kwargs) Deletes the rules and alerting logging configuration for a workspace. Note: These logging configurations are only for rules and alerting logs. See also: AWS API Documentation **Request Syntax** response = client.delete_logging_configuration( clientToken='string', workspaceId='string' ) Parameters: * **clientToken** (*string*) -- A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. This field is autopopulated if not provided. * **workspaceId** (*string*) -- **[REQUIRED]** The ID of the workspace containing the logging configuration to delete. Returns: None **Exceptions** * "PrometheusService.Client.exceptions.ConflictException" * "PrometheusService.Client.exceptions.ValidationException" * "PrometheusService.Client.exceptions.ResourceNotFoundException" * "PrometheusService.Client.exceptions.AccessDeniedException" * "PrometheusService.Client.exceptions.InternalServerException"