{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-datazone/json-schema/amazon-datazone-update-rule-input-schema.json",
  "title": "UpdateRuleInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-datazone-rules-api-openapi.yml#/components/schemas/UpdateRuleInput",
  "type": "object",
  "properties": {
    "domainIdentifier": {
      "type": "string",
      "description": "The ID of the domain in which a rule is to be updated."
    },
    "identifier": {
      "type": "string",
      "description": "The ID of the rule that is to be updated"
    },
    "name": {
      "type": "string",
      "description": "The name of the rule."
    },
    "description": {
      "type": "string",
      "description": "The description of the rule."
    },
    "scope": {
      "$ref": "#/$defs/RuleScope"
    },
    "detail": {
      "$ref": "#/$defs/RuleDetail"
    },
    "includeChildDomainUnits": {
      "type": "boolean",
      "description": "Specifies whether to update this rule in the child domain units."
    }
  },
  "required": [
    "domainIdentifier",
    "identifier"
  ],
  "$defs": {
    "AssetTypesForRule": {
      "type": "object",
      "properties": {
        "selectionMode": {
          "type": "string",
          "enum": [
            "ALL",
            "SPECIFIC"
          ],
          "description": "The selection mode for the rule."
        },
        "specificAssetTypes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The specific asset types that are included in the rule."
        }
      },
      "required": [
        "selectionMode"
      ]
    },
    "GlossaryTermEnforcementDetail": {
      "type": "object",
      "properties": {
        "requiredGlossaryTermIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The ID of the required glossary term."
        }
      }
    },
    "MetadataFormEnforcementDetail": {
      "type": "object",
      "properties": {
        "requiredMetadataForms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MetadataFormReference"
          },
          "description": "The required metadata forms."
        }
      }
    },
    "MetadataFormReference": {
      "type": "object",
      "properties": {
        "typeIdentifier": {
          "type": "string",
          "description": "The type ID of the metadata form reference."
        },
        "typeRevision": {
          "type": "string",
          "description": "The type revision of the metadata form reference."
        }
      },
      "required": [
        "typeIdentifier",
        "typeRevision"
      ]
    },
    "ProjectsForRule": {
      "type": "object",
      "properties": {
        "selectionMode": {
          "type": "string",
          "enum": [
            "ALL",
            "SPECIFIC"
          ],
          "description": "The selection mode of the rule."
        },
        "specificProjects": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The specific projects in which the rule is created."
        }
      },
      "required": [
        "selectionMode"
      ]
    },
    "RuleDetail": {
      "type": "object",
      "properties": {
        "metadataFormEnforcementDetail": {
          "$ref": "#/$defs/MetadataFormEnforcementDetail"
        },
        "glossaryTermEnforcementDetail": {
          "$ref": "#/$defs/GlossaryTermEnforcementDetail"
        }
      },
      "description": "Exactly one member is set."
    },
    "RuleScope": {
      "type": "object",
      "properties": {
        "assetType": {
          "$ref": "#/$defs/AssetTypesForRule"
        },
        "dataProduct": {
          "type": "boolean",
          "description": "The data product included in the rule scope."
        },
        "project": {
          "$ref": "#/$defs/ProjectsForRule"
        }
      }
    }
  }
}