{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-managed-prometheus/json-schema/amazon-managed-prometheus-update-scraper-request-schema.json",
  "title": "UpdateScraperRequest",
  "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/UpdateScraperRequest",
  "type": "object",
  "properties": {
    "scraperId": {
      "type": "string",
      "description": "The ID of the scraper to update."
    },
    "alias": {
      "type": "string",
      "description": "The new alias of the scraper."
    },
    "scrapeConfiguration": {
      "$ref": "#/$defs/ScrapeConfiguration"
    },
    "destination": {
      "$ref": "#/$defs/Destination"
    },
    "roleConfiguration": {
      "$ref": "#/$defs/RoleConfiguration"
    },
    "clientToken": {
      "type": "string",
      "description": "A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive."
    },
    "exporters": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ExporterConfiguration"
      },
      "description": "The exporter configurations for the scraper. You can configure at most one Amazon OpenSearch Service domain. If you don't specify a value, the existing exporter configuration remains unchanged."
    }
  },
  "required": [
    "scraperId"
  ],
  "$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."
    },
    "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."
        }
      }
    },
    "ScrapeConfiguration": {
      "type": "object",
      "properties": {
        "configurationBlob": {
          "type": "string",
          "description": "The base 64 encoded scrape configuration file."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}