{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-codeartifact/json-schema/amazon-codeartifact-update-package-group-origin-configuration-request-schema.json",
  "title": "UpdatePackageGroupOriginConfigurationRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-codeartifact-operations-api-openapi.yml#/components/schemas/UpdatePackageGroupOriginConfigurationRequest",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "description": "The name of the domain which contains the package group for which to update the origin configuration."
    },
    "domainOwner": {
      "type": "string",
      "description": "The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces."
    },
    "packageGroup": {
      "type": "string",
      "description": "The pattern of the package group for which to update the origin configuration."
    },
    "restrictions": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "enum": [
          "ALLOW",
          "ALLOW_SPECIFIC_REPOSITORIES",
          "BLOCK",
          "INHERIT"
        ]
      },
      "description": "The origin configuration settings that determine how package versions can enter repositories."
    },
    "addAllowedRepositories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PackageGroupAllowedRepository"
      },
      "description": "The repository name and restrictions to add to the allowed repository list of the specified package group."
    },
    "removeAllowedRepositories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PackageGroupAllowedRepository"
      },
      "description": "The repository name and restrictions to remove from the allowed repository list of the specified package group."
    }
  },
  "required": [
    "domain",
    "packageGroup"
  ],
  "$defs": {
    "PackageGroupAllowedRepository": {
      "type": "object",
      "properties": {
        "repositoryName": {
          "type": "string",
          "description": "The name of the allowed repository."
        },
        "originRestrictionType": {
          "type": "string",
          "enum": [
            "EXTERNAL_UPSTREAM",
            "INTERNAL_UPSTREAM",
            "PUBLISH"
          ],
          "description": "The origin configuration restriction type of the allowed repository."
        }
      }
    }
  }
}