{"files":{"SKILL.md":"---\nname: amazon-prometheus-service\ndescription: \"Amazon Prometheus Service API skill. Use when working with Amazon Prometheus Service for workspaces, scrapers, scraperconfiguration. Covers 26 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Amazon Prometheus Service\nAPI version: 2020-08-01\n\n## Auth\nAWS SigV4\n\n## Base URL\nNot specified.\n\n## Setup\n1. Configure auth: AWS SigV4\n2. GET /scraperconfiguration -- the getdefaultscraperconfiguration operation returns the default scraper configuration used when amazon eks creates a scraper for you.\n3. POST /workspaces/{workspaceId}/alertmanager/definition -- create first definition\n\n## Endpoints\n26 endpoints across 4 groups. See references/api-spec.lap for full details.\n\n### Workspaces\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /workspaces/{workspaceId}/alertmanager/definition | 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. |\n| POST | /workspaces/{workspaceId}/logging | The CreateLoggingConfiguration operation creates a logging configuration for the workspace. Use this operation to set the CloudWatch log group to which the logs will be published to. |\n| POST | /workspaces/{workspaceId}/rulegroupsnamespaces | 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. |\n| POST | /workspaces | 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. |\n| DELETE | /workspaces/{workspaceId}/alertmanager/definition | Deletes the alert manager definition from a workspace. |\n| DELETE | /workspaces/{workspaceId}/logging | Deletes the logging configuration for a workspace. |\n| DELETE | /workspaces/{workspaceId}/rulegroupsnamespaces/{name} | Deletes one rule groups namespace and its associated rule groups definition. |\n| DELETE | /workspaces/{workspaceId} | Deletes an existing workspace.   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. |\n| GET | /workspaces/{workspaceId}/alertmanager/definition | Retrieves the full information about the alert manager definition for a workspace. |\n| GET | /workspaces/{workspaceId}/logging | Returns complete information about the current logging configuration of the workspace. |\n| GET | /workspaces/{workspaceId}/rulegroupsnamespaces/{name} | Returns complete information about one rule groups namespace. To retrieve a list of rule groups namespaces, use ListRuleGroupsNamespaces. |\n| GET | /workspaces/{workspaceId} | Returns information about an existing workspace. |\n| GET | /workspaces/{workspaceId}/rulegroupsnamespaces | Returns a list of rule groups namespaces in a workspace. |\n| GET | /workspaces | Lists all of the Amazon Managed Service for Prometheus workspaces in your account. This includes workspaces being created or deleted. |\n| PUT | /workspaces/{workspaceId}/alertmanager/definition | 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. |\n| PUT | /workspaces/{workspaceId}/rulegroupsnamespaces/{name} | 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. |\n| PUT | /workspaces/{workspaceId}/logging | Updates the log group ARN or the workspace ID of the current logging configuration. |\n| POST | /workspaces/{workspaceId}/alias | Updates the alias of an existing workspace. |\n\n### Scrapers\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /scrapers | 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. You can configure the scraper to control what metrics are collected, and what transformations are applied prior to sending them to your workspace. If needed, an IAM role will be created for you that gives Amazon Managed Service for Prometheus access to the metrics in your cluster. For more information, see Using roles for scraping metrics from EKS in the Amazon Managed Service for Prometheus User Guide. You cannot update a scraper. If you want to change the configuration of the scraper, create a new scraper and delete the old one. The scrapeConfiguration parameter contains the base64-encoded version of the YAML configuration file.  For more information about collectors, including what metrics are collected, and how to configure the scraper, see Amazon Web Services managed collectors in the Amazon Managed Service for Prometheus User Guide. |\n| DELETE | /scrapers/{scraperId} | The DeleteScraper operation deletes one scraper, and stops any metrics collection that the scraper performs. |\n| GET | /scrapers/{scraperId} | The DescribeScraper operation displays information about an existing scraper. |\n| GET | /scrapers | 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. |\n\n### Scraperconfiguration\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /scraperconfiguration | The GetDefaultScraperConfiguration operation returns the default scraper configuration used when Amazon EKS creates a scraper for you. |\n\n### Tags\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /tags/{resourceArn} | 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 workspaces and rule groups namespaces. |\n| POST | /tags/{resourceArn} | The TagResource operation associates tags with an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are workspaces and rule groups namespaces.  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. |\n| DELETE | /tags/{resourceArn} | Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are workspaces and rule groups namespaces. |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a definition?\" -> POST /workspaces/{workspaceId}/alertmanager/definition\n- \"Create a logging?\" -> POST /workspaces/{workspaceId}/logging\n- \"Create a rulegroupsnamespace?\" -> POST /workspaces/{workspaceId}/rulegroupsnamespaces\n- \"Create a scraper?\" -> POST /scrapers\n- \"Create a workspace?\" -> POST /workspaces\n- \"Delete a rulegroupsnamespace?\" -> DELETE /workspaces/{workspaceId}/rulegroupsnamespaces/{name}\n- \"Delete a scraper?\" -> DELETE /scrapers/{scraperId}\n- \"Delete a workspace?\" -> DELETE /workspaces/{workspaceId}\n- \"List all definition?\" -> GET /workspaces/{workspaceId}/alertmanager/definition\n- \"List all logging?\" -> GET /workspaces/{workspaceId}/logging\n- \"Get rulegroupsnamespace details?\" -> GET /workspaces/{workspaceId}/rulegroupsnamespaces/{name}\n- \"Get scraper details?\" -> GET /scrapers/{scraperId}\n- \"Get workspace details?\" -> GET /workspaces/{workspaceId}\n- \"List all scraperconfiguration?\" -> GET /scraperconfiguration\n- \"List all rulegroupsnamespaces?\" -> GET /workspaces/{workspaceId}/rulegroupsnamespaces\n- \"List all scrapers?\" -> GET /scrapers\n- \"Get tag details?\" -> GET /tags/{resourceArn}\n- \"List all workspaces?\" -> GET /workspaces\n- \"Update a rulegroupsnamespace?\" -> PUT /workspaces/{workspaceId}/rulegroupsnamespaces/{name}\n- \"Delete a tag?\" -> DELETE /tags/{resourceArn}\n- \"Create a alia?\" -> POST /workspaces/{workspaceId}/alias\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Amazon Prometheus Service\n@version 2020-08-01\n@auth AWS SigV4\n@endpoints 26\n@hint download_for_search\n@toc workspaces(18), scrapers(4), scraperconfiguration(1), tags(3)\n\n@group workspaces\n@endpoint POST /workspaces/{workspaceId}/alertmanager/definition\n@desc 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.\n@required {workspaceId: str, data: bytes}\n@optional {clientToken: str}\n@returns(200) {status: AlertManagerDefinitionStatus{statusCode: str, statusReason: str?}}\n\n@endpoint POST /workspaces/{workspaceId}/logging\n@desc The CreateLoggingConfiguration operation creates a logging configuration for the workspace. Use this operation to set the CloudWatch log group to which the logs will be published to.\n@required {workspaceId: str, logGroupArn: str}\n@optional {clientToken: str}\n@returns(200) {status: LoggingConfigurationStatus{statusCode: str, statusReason: str?}}\n\n@endpoint POST /workspaces/{workspaceId}/rulegroupsnamespaces\n@desc 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.\n@required {workspaceId: str, data: bytes, name: str}\n@optional {clientToken: str, tags: map<str,str>}\n@returns(200) {arn: str, name: str, status: RuleGroupsNamespaceStatus{statusCode: str, statusReason: str?}, tags: map<str,str>?}\n\n@endgroup\n\n@group scrapers\n@endpoint POST /scrapers\n@desc 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. You can configure the scraper to control what metrics are collected, and what transformations are applied prior to sending them to your workspace. If needed, an IAM role will be created for you that gives Amazon Managed Service for Prometheus access to the metrics in your cluster. For more information, see Using roles for scraping metrics from EKS in the Amazon Managed Service for Prometheus User Guide. You cannot update a scraper. If you want to change the configuration of the scraper, create a new scraper and delete the old one. The scrapeConfiguration parameter contains the base64-encoded version of the YAML configuration file.  For more information about collectors, including what metrics are collected, and how to configure the scraper, see Amazon Web Services managed collectors in the Amazon Managed Service for Prometheus User Guide.\n@required {destination: Destination, scrapeConfiguration: ScrapeConfiguration, source: Source}\n@optional {alias: str, clientToken: str, tags: map<str,str>}\n@returns(200) {arn: str, scraperId: str, status: ScraperStatus{statusCode: str}, tags: map<str,str>?}\n\n@endgroup\n\n@group workspaces\n@endpoint POST /workspaces\n@desc 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.\n@optional {alias: str, clientToken: str, kmsKeyArn: str, tags: map<str,str>}\n@returns(200) {arn: str, kmsKeyArn: str?, status: WorkspaceStatus{statusCode: str}, tags: map<str,str>?, workspaceId: str}\n\n@endpoint DELETE /workspaces/{workspaceId}/alertmanager/definition\n@desc Deletes the alert manager definition from a workspace.\n@required {workspaceId: str}\n@optional {clientToken: str}\n\n@endpoint DELETE /workspaces/{workspaceId}/logging\n@desc Deletes the logging configuration for a workspace.\n@required {workspaceId: str}\n@optional {clientToken: str}\n\n@endpoint DELETE /workspaces/{workspaceId}/rulegroupsnamespaces/{name}\n@desc Deletes one rule groups namespace and its associated rule groups definition.\n@required {name: str, workspaceId: str}\n@optional {clientToken: str}\n\n@endgroup\n\n@group scrapers\n@endpoint DELETE /scrapers/{scraperId}\n@desc The DeleteScraper operation deletes one scraper, and stops any metrics collection that the scraper performs.\n@required {scraperId: str}\n@optional {clientToken: str}\n@returns(200) {scraperId: str, status: ScraperStatus{statusCode: str}}\n\n@endgroup\n\n@group workspaces\n@endpoint DELETE /workspaces/{workspaceId}\n@desc Deletes an existing workspace.   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.\n@required {workspaceId: str}\n@optional {clientToken: str}\n\n@endpoint GET /workspaces/{workspaceId}/alertmanager/definition\n@desc Retrieves the full information about the alert manager definition for a workspace.\n@required {workspaceId: str}\n@returns(200) {alertManagerDefinition: AlertManagerDefinitionDescription{createdAt: str(timestamp), data: bytes, modifiedAt: str(timestamp), status: AlertManagerDefinitionStatus{statusCode: str, statusReason: str?}}}\n\n@endpoint GET /workspaces/{workspaceId}/logging\n@desc Returns complete information about the current logging configuration of the workspace.\n@required {workspaceId: str}\n@returns(200) {loggingConfiguration: LoggingConfigurationMetadata{createdAt: str(timestamp), logGroupArn: str, modifiedAt: str(timestamp), status: LoggingConfigurationStatus{statusCode: str, statusReason: str?}, workspace: str}}\n\n@endpoint GET /workspaces/{workspaceId}/rulegroupsnamespaces/{name}\n@desc Returns complete information about one rule groups namespace. To retrieve a list of rule groups namespaces, use ListRuleGroupsNamespaces.\n@required {name: str, workspaceId: str}\n@returns(200) {ruleGroupsNamespace: RuleGroupsNamespaceDescription{arn: str, createdAt: str(timestamp), data: bytes, modifiedAt: str(timestamp), name: str, status: RuleGroupsNamespaceStatus{statusCode: str, statusReason: str?}, tags: map<str, str>?: any}}\n\n@endgroup\n\n@group scrapers\n@endpoint GET /scrapers/{scraperId}\n@desc The DescribeScraper operation displays information about an existing scraper.\n@required {scraperId: str}\n@returns(200) {scraper: ScraperDescription{alias: str?, arn: str, createdAt: str(timestamp), destination: Destination{ampConfiguration: AmpConfiguration?{workspaceArn: str}}, lastModifiedAt: str(timestamp), roleArn: str, scrapeConfiguration: ScrapeConfiguration{configurationBlob: bytes?}, scraperId: str, source: Source{eksConfiguration: EksConfiguration?{clusterArn: str, securityGroupIds: [str]?, subnetIds: [str]}}, status: ScraperStatus{statusCode: str}, statusReason: str?, tags: map<str, str>?: any}}\n\n@endgroup\n\n@group workspaces\n@endpoint GET /workspaces/{workspaceId}\n@desc Returns information about an existing workspace.\n@required {workspaceId: str}\n@returns(200) {workspace: WorkspaceDescription{alias: str?, arn: str, createdAt: str(timestamp), kmsKeyArn: str?, prometheusEndpoint: str?, status: WorkspaceStatus{statusCode: str}, tags: map<str, str>?: any, workspaceId: str}}\n\n@endgroup\n\n@group scraperconfiguration\n@endpoint GET /scraperconfiguration\n@desc The GetDefaultScraperConfiguration operation returns the default scraper configuration used when Amazon EKS creates a scraper for you.\n@returns(200) {configuration: bytes}\n\n@endgroup\n\n@group workspaces\n@endpoint GET /workspaces/{workspaceId}/rulegroupsnamespaces\n@desc Returns a list of rule groups namespaces in a workspace.\n@required {workspaceId: str}\n@optional {maxResults: int, name: str, nextToken: str}\n@returns(200) {nextToken: str?, ruleGroupsNamespaces: [RuleGroupsNamespaceSummary]}\n\n@endgroup\n\n@group scrapers\n@endpoint GET /scrapers\n@desc 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.\n@optional {filters: map<str,[str]>, maxResults: int, nextToken: str}\n@returns(200) {nextToken: str?, scrapers: [ScraperSummary]}\n\n@endgroup\n\n@group tags\n@endpoint GET /tags/{resourceArn}\n@desc 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 workspaces and rule groups namespaces.\n@required {resourceArn: str}\n@returns(200) {tags: map<str,str>?}\n\n@endgroup\n\n@group workspaces\n@endpoint GET /workspaces\n@desc Lists all of the Amazon Managed Service for Prometheus workspaces in your account. This includes workspaces being created or deleted.\n@optional {alias: str, maxResults: int, nextToken: str}\n@returns(200) {nextToken: str?, workspaces: [WorkspaceSummary]}\n\n@endpoint PUT /workspaces/{workspaceId}/alertmanager/definition\n@desc 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.\n@required {workspaceId: str, data: bytes}\n@optional {clientToken: str}\n@returns(200) {status: AlertManagerDefinitionStatus{statusCode: str, statusReason: str?}}\n\n@endpoint PUT /workspaces/{workspaceId}/rulegroupsnamespaces/{name}\n@desc 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.\n@required {name: str, workspaceId: str, data: bytes}\n@optional {clientToken: str}\n@returns(200) {arn: str, name: str, status: RuleGroupsNamespaceStatus{statusCode: str, statusReason: str?}, tags: map<str,str>?}\n\n@endgroup\n\n@group tags\n@endpoint POST /tags/{resourceArn}\n@desc The TagResource operation associates tags with an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are workspaces and rule groups namespaces.  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.\n@required {resourceArn: str, tags: map<str,str>}\n\n@endpoint DELETE /tags/{resourceArn}\n@desc Removes the specified tags from an Amazon Managed Service for Prometheus resource. The only resources that can be tagged are workspaces and rule groups namespaces.\n@required {resourceArn: str, tagKeys: [str]}\n\n@endgroup\n\n@group workspaces\n@endpoint PUT /workspaces/{workspaceId}/logging\n@desc Updates the log group ARN or the workspace ID of the current logging configuration.\n@required {workspaceId: str, logGroupArn: str}\n@optional {clientToken: str}\n@returns(200) {status: LoggingConfigurationStatus{statusCode: str, statusReason: str?}}\n\n@endpoint POST /workspaces/{workspaceId}/alias\n@desc Updates the alias of an existing workspace.\n@required {workspaceId: str}\n@optional {alias: str, clientToken: str}\n\n@endgroup\n\n@end\n"}}