{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-cloudwatch/json-schema/amazon-cloudwatch-list-log-groups-request-schema.json",
  "title": "ListLogGroupsRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-cloudwatch-log-group-api-openapi.yml#/components/schemas/ListLogGroupsRequest",
  "type": "object",
  "properties": {
    "logGroupNamePattern": {
      "type": "string",
      "description": "Use this parameter to limit the returned log groups to only those with names that match the pattern that you specify. This parameter is a regular expression that can match prefixes and substrings, and supports wildcard matching and matching multiple patterns, as in the following examples. Use ^ to match log group names by prefix. For a substring match, specify the string to match. All matches are case sensitive To match multiple patterns, separate them with a | as in the example ^/aws/lambda|discovery You can specify as many as five different regular expression patterns in this field, each of "
    },
    "logGroupClass": {
      "type": "string",
      "enum": [
        "STANDARD",
        "INFREQUENT_ACCESS",
        "DELIVERY",
        "ESSENTIALS"
      ],
      "description": "Use this parameter to limit the results to only those log groups in the specified log group class. If you omit this parameter, log groups of all classes can be returned."
    },
    "includeLinkedAccounts": {
      "type": "boolean",
      "description": "If you are using a monitoring account, set this to true to have the operation return log groups in the accounts listed in accountIdentifiers. If this parameter is set to true and accountIdentifiers contains a null value, the operation returns all log groups in the monitoring account and all log groups in all source accounts that are linked to the monitoring account. The default for this parameter is false."
    },
    "accountIdentifiers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "When includeLinkedAccounts is set to true, use this parameter to specify the list of accounts to search. You can specify as many as 20 account IDs in the array."
    },
    "nextToken": {
      "type": "string"
    },
    "limit": {
      "type": "integer",
      "description": "The maximum number of log groups to return. If you omit this parameter, the default is up to 50 log groups."
    },
    "dataSources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataSourceFilter"
      },
      "description": "An array of data source filters to filter log groups by their associated data sources. You can filter by data source name, type, or both. Multiple filters within the same dimension are combined with OR logic, while filters across different dimensions are combined with AND logic."
    },
    "fieldIndexNames": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "An array of field index names to filter log groups that have specific field indexes. Only log groups containing all specified field indexes are returned. You can specify 1 to 20 field index names, each with 1 to 512 characters."
    },
    "logGroupTags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TagFilter"
      },
      "description": "An array of tag filters to return only log groups that have specific tags. Multiple filters are combined with AND logic."
    }
  },
  "$defs": {
    "DataSourceFilter": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name pattern to filter data sources by."
        },
        "type": {
          "type": "string",
          "description": "The type pattern to filter data sources by."
        }
      },
      "required": [
        "name"
      ]
    },
    "TagFilter": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The tag key to filter on."
        },
        "values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An optional list of tag values to filter on. If you specify a filter that contains more than one value for a key, the response returns log groups that match any of the specified values for that key. If you don't specify values, the response returns all log groups that are tagged with that key, with any or no value. Use * for wildcard matching. For example, prod* matches values that start with prod. Use ! as a prefix for negation. For example, !prod matches values that are not prod. Exact matching and negation are case-sensitive. Wildcard matching is case-insensitive."
        }
      },
      "required": [
        "key"
      ]
    }
  }
}