{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-security-hub/json-schema/aws-security-hub-get-software-v2-request-schema.json",
  "title": "GetSoftwareV2Request",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-security-hub-softwarev2-api-openapi.yml#/components/schemas/GetSoftwareV2Request",
  "type": "object",
  "properties": {
    "Filters": {
      "$ref": "#/$defs/SoftwareFilters"
    },
    "Scopes": {
      "$ref": "#/$defs/SoftwareScopes"
    },
    "SortCriteria": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SortCriterion"
      },
      "description": "The software attributes used to sort the list of returned software packages. You can't sort by ResourceCount."
    },
    "NextToken": {
      "type": "string",
      "description": "The token required for pagination. On your first call, set the value of this parameter to NULL. For subsequent calls, to continue listing data, set the value of this parameter to the value returned in the previous response. A token expires one hour after it's issued. If you change Filters or SortCriteria between calls, the token is no longer valid and the request fails with a ValidationException."
    },
    "MaxResults": {
      "type": "integer",
      "description": "The maximum number of results to return. Valid values are 1–100. The default is 100."
    }
  },
  "$defs": {
    "AwsOrganizationScope": {
      "type": "object",
      "properties": {
        "OrganizationId": {
          "type": "string",
          "description": "The unique identifier (ID) of the organization (for example, o-abcd1234567890). The organization must be the delegated administrator's own organization. If you omit this value and provide OrganizationalUnitId, Security Hub uses the caller's organization ID."
        },
        "OrganizationalUnitId": {
          "type": "string",
          "description": "The unique identifier (ID) of the organizational unit (OU) (for example, ou-ab12-cd345678). The OU must exist within the delegated administrator's own organization. When specified, the results include only data from accounts in this OU."
        }
      }
    },
    "SoftwareCompositeFilter": {
      "type": "object",
      "properties": {
        "StringFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SoftwareStringFilter"
          },
          "description": "Enables filtering based on string field values."
        },
        "NestedCompositeFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SoftwareCompositeFilter"
          },
          "description": "Provides an additional level of filtering, creating a three-layer nested structure. The first layer is a CompositeFilters array with a CompositeOperator (AND/OR). The second layer is a CompositeFilter object that contains direct filters and NestedCompositeFilters. The third layer is NestedCompositeFilters, which contains additional filter conditions."
        },
        "Operator": {
          "type": "string",
          "enum": [
            "AND",
            "OR"
          ],
          "description": "The logical operator used to combine multiple filter conditions."
        }
      }
    },
    "SoftwareFilters": {
      "type": "object",
      "properties": {
        "CompositeFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SoftwareCompositeFilter"
          },
          "description": "A collection of complex filtering conditions that can be applied to software packages."
        },
        "CompositeOperator": {
          "type": "string",
          "enum": [
            "AND",
            "OR"
          ],
          "description": "The logical operator used to combine multiple filter conditions in the structure."
        }
      }
    },
    "SoftwareScopes": {
      "type": "object",
      "properties": {
        "AwsOrganizations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AwsOrganizationScope"
          },
          "description": "A list of Organizations scopes to include in the query results. Each entry in the list specifies an organization or organizational unit to include for the delegated administrator's account. If the list specifies multiple entries, the entries are combined using OR logic."
        }
      }
    },
    "SoftwareStringFilter": {
      "type": "object",
      "properties": {
        "FieldName": {
          "type": "string",
          "enum": [
            "AccountId",
            "PackageName",
            "PackageVersion",
            "PackageType",
            "Region",
            "ResourceRegion",
            "ResourceType",
            "ResourceId",
            "ResourceProvider",
            "ResourceOwnerAccountId",
            "ResourceOwnerOrgId",
            "ResourceCloudPartition"
          ],
          "description": "The name of the field."
        },
        "Filter": {
          "$ref": "#/$defs/StringFilter"
        }
      }
    },
    "SortCriterion": {
      "type": "object",
      "properties": {
        "Field": {
          "type": "string",
          "description": "The finding attribute used to sort findings."
        },
        "SortOrder": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "description": "The order used to sort findings."
        }
      }
    },
    "StringFilter": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "string",
          "description": "The string filter value. Filter values are case sensitive. For example, the product name for control-based findings is Security Hub CSPM. If you provide security hub as the filter value, there's no match."
        },
        "Comparison": {
          "type": "string",
          "enum": [
            "EQUALS",
            "PREFIX",
            "NOT_EQUALS",
            "PREFIX_NOT_EQUALS",
            "CONTAINS",
            "NOT_CONTAINS",
            "CONTAINS_WORD"
          ],
          "description": "The condition to apply to a string value when filtering Security Hub CSPM findings. To search for values that have the filter value, use one of the following comparison operators: To search for values that include the filter value, use CONTAINS. For example, the filter Title CONTAINS CloudFront matches findings that have a Title that includes the string CloudFront. To search for values that contain a word matching the filter value, regardless of case, use CONTAINS_WORD. For example, the filter Title CONTAINS_WORD lambda matches a finding whose Title is GuardDuty Lambda Protection, because the "
        }
      }
    }
  }
}