{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudwatch/json-schema/amazon-cloudwatch-update-scheduled-query-response-schema.json",
  "title": "UpdateScheduledQueryResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloudwatch-scheduled-query-api-openapi.yml#/components/schemas/UpdateScheduledQueryResponse",
  "type": "object",
  "properties": {
    "scheduledQueryArn": {
      "type": "string",
      "description": "The ARN of the updated scheduled query."
    },
    "name": {
      "type": "string",
      "description": "The name of the updated scheduled query."
    },
    "description": {
      "type": "string",
      "description": "The description of the updated scheduled query."
    },
    "queryLanguage": {
      "type": "string",
      "enum": [
        "CWLI",
        "SQL",
        "PPL"
      ],
      "description": "The query language of the updated scheduled query."
    },
    "queryString": {
      "type": "string",
      "description": "The query string of the updated scheduled query."
    },
    "logGroupIdentifiers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The log groups queried by the updated scheduled query."
    },
    "scheduleExpression": {
      "type": "string",
      "description": "The cron expression of the updated scheduled query."
    },
    "timezone": {
      "type": "string",
      "description": "The timezone of the updated scheduled query."
    },
    "startTimeOffset": {
      "type": "integer",
      "description": "The time offset of the updated scheduled query."
    },
    "endTimeOffset": {
      "type": "integer",
      "description": "The end time offset in seconds of the updated scheduled query."
    },
    "destinationConfiguration": {
      "$ref": "#/$defs/DestinationConfiguration"
    },
    "state": {
      "type": "string",
      "enum": [
        "ENABLED",
        "DISABLED"
      ],
      "description": "The state of the updated scheduled query."
    },
    "scheduleType": {
      "type": "string",
      "enum": [
        "CUSTOMER_MANAGED",
        "AWS_MANAGED"
      ],
      "description": "The schedule type of the updated scheduled query."
    },
    "lastTriggeredTime": {
      "type": "integer",
      "description": "The timestamp when the updated scheduled query was last executed."
    },
    "lastExecutionStatus": {
      "type": "string",
      "enum": [
        "Running",
        "InvalidQuery",
        "Complete",
        "Failed",
        "Timeout"
      ],
      "description": "The status of the most recent execution of the updated scheduled query."
    },
    "scheduleStartTime": {
      "type": "integer",
      "description": "The start time of the updated scheduled query."
    },
    "scheduleEndTime": {
      "type": "integer",
      "description": "The end time of the updated scheduled query."
    },
    "executionRoleArn": {
      "type": "string",
      "description": "The execution role ARN of the updated scheduled query."
    },
    "creationTime": {
      "type": "integer",
      "description": "The timestamp when the scheduled query was originally created."
    },
    "lastUpdatedTime": {
      "type": "integer",
      "description": "The timestamp when the scheduled query was last updated."
    }
  },
  "$defs": {
    "DestinationConfiguration": {
      "type": "object",
      "properties": {
        "s3Configuration": {
          "$ref": "#/$defs/S3Configuration"
        },
        "lookupTableConfiguration": {
          "$ref": "#/$defs/LookupTableConfiguration"
        }
      }
    },
    "LookupTableConfiguration": {
      "type": "object",
      "properties": {
        "tableName": {
          "type": "string",
          "description": "The name of the lookup table to create or update with query results. The name can contain only alphanumeric characters and underscores."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants permissions to create or update the lookup table with query results."
        },
        "description": {
          "type": "string",
          "description": "A description of the lookup table."
        },
        "kmsKeyId": {
          "type": "string",
          "description": "The ARN of the KMS key to use to encrypt the lookup table data. If you don't specify a key, the data is encrypted with an Amazon Web Services-owned key."
        },
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Key-value pairs to associate with the lookup table for resource management and cost allocation. The service applies tags only during initial table creation."
        }
      },
      "required": [
        "tableName",
        "roleArn"
      ]
    },
    "S3Configuration": {
      "type": "object",
      "properties": {
        "destinationIdentifier": {
          "type": "string",
          "description": "The Amazon S3 URI where query results are delivered. Must be a valid S3 URI format."
        },
        "roleArn": {
          "type": "string",
          "description": "The ARN of the IAM role that grants permissions to write query results to the specified Amazon S3 destination."
        },
        "ownerAccountId": {
          "type": "string",
          "description": "The Amazon Web Services accountId for the bucket owning account."
        },
        "kmsKeyId": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the KMS encryption key. Must belong to the same Amazon Web Services Region as the destination Amazon S3 bucket."
        }
      },
      "required": [
        "destinationIdentifier",
        "roleArn"
      ]
    }
  }
}