{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-managed-prometheus/json-schema/amazon-managed-prometheus-list-scrapers-response-schema.json",
  "title": "ListScrapersResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-managed-prometheus-scrapers-api-openapi.yml#/components/schemas/ListScrapersResponse",
  "type": "object",
  "properties": {
    "scrapers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ScraperSummary"
      },
      "description": "A list of ScraperSummary structures giving information about scrapers in the account that match the filters provided."
    },
    "nextToken": {
      "type": "string",
      "description": "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."
    }
  },
  "required": [
    "scrapers"
  ],
  "$defs": {
    "AmpConfiguration": {
      "type": "object",
      "properties": {
        "workspaceArn": {
          "type": "string",
          "description": "ARN of the Amazon Managed Service for Prometheus workspace."
        }
      },
      "required": [
        "workspaceArn"
      ]
    },
    "CloudWatchConfiguration": {
      "type": "object",
      "properties": {
        "datasetArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the CloudWatch dataset. To use the default dataset, specify arn:aws:cloudwatch:&lt;region&gt;:&lt;account-id&gt;:dataset/default."
        }
      },
      "required": [
        "datasetArn"
      ]
    },
    "Destination": {
      "type": "object",
      "properties": {
        "ampConfiguration": {
          "$ref": "#/$defs/AmpConfiguration"
        },
        "cloudWatchConfiguration": {
          "$ref": "#/$defs/CloudWatchConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "EksConfiguration": {
      "type": "object",
      "properties": {
        "clusterArn": {
          "type": "string",
          "description": "ARN of the Amazon EKS cluster."
        },
        "securityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of the security group IDs for the Amazon EKS cluster VPC configuration."
        },
        "subnetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of subnet IDs for the Amazon EKS cluster VPC configuration."
        }
      },
      "required": [
        "clusterArn",
        "subnetIds"
      ]
    },
    "ExporterConfiguration": {
      "type": "object",
      "properties": {
        "openSearchConfiguration": {
          "$ref": "#/$defs/OpenSearchExporterConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "OpenSearchExporterConfiguration": {
      "type": "object",
      "properties": {
        "domainArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon OpenSearch Service domain."
        }
      },
      "required": [
        "domainArn"
      ]
    },
    "RoleConfiguration": {
      "type": "object",
      "properties": {
        "sourceRoleArn": {
          "type": "string",
          "description": "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": {
          "type": "string",
          "description": "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."
        }
      }
    },
    "ScraperStatus": {
      "type": "object",
      "properties": {
        "statusCode": {
          "type": "string",
          "description": "The current status of the scraper."
        }
      },
      "required": [
        "statusCode"
      ]
    },
    "ScraperSummary": {
      "type": "object",
      "properties": {
        "alias": {
          "type": "string",
          "description": "(Optional) A name associated with the scraper."
        },
        "scraperId": {
          "type": "string",
          "description": "The ID of the scraper."
        },
        "arn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the scraper."
        },
        "roleArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the IAM role that provides permissions for the scraper to discover and collect metrics on your behalf."
        },
        "status": {
          "$ref": "#/$defs/ScraperStatus"
        },
        "createdAt": {
          "type": "string",
          "description": "The date and time that the scraper was created."
        },
        "lastModifiedAt": {
          "type": "string",
          "description": "The date and time that the scraper was last modified."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "(Optional) The list of tag keys and values associated with the scraper."
        },
        "statusReason": {
          "type": "string",
          "description": "If there is a failure, the reason for the failure."
        },
        "source": {
          "$ref": "#/$defs/Source"
        },
        "destination": {
          "$ref": "#/$defs/Destination"
        },
        "roleConfiguration": {
          "$ref": "#/$defs/RoleConfiguration"
        },
        "exporters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ExporterConfiguration"
          },
          "description": "The exporter configurations for the scraper, if configured. The list contains at most one configuration for an Amazon OpenSearch Service domain."
        }
      },
      "required": [
        "scraperId",
        "arn",
        "roleArn",
        "status",
        "createdAt",
        "lastModifiedAt",
        "source",
        "destination"
      ]
    },
    "Source": {
      "type": "object",
      "properties": {
        "eksConfiguration": {
          "$ref": "#/$defs/EksConfiguration"
        },
        "vpcConfiguration": {
          "$ref": "#/$defs/VpcConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "VpcConfiguration": {
      "type": "object",
      "properties": {
        "securityGroupIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The security group IDs that control network access for the Prometheus collector. These security groups must allow the collector to communicate with your Amazon MSK cluster on the required ports."
        },
        "subnetIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The subnet IDs where the Prometheus collector will be deployed. The subnets must be in the same Amazon VPC as your Amazon MSK cluster and have network connectivity to the cluster."
        }
      },
      "required": [
        "securityGroupIds",
        "subnetIds"
      ]
    }
  }
}