{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-update-access-policy-request-schema.json",
  "title": "UpdateAccessPolicyRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-access-policies-api-openapi.yml#/components/schemas/UpdateAccessPolicyRequest",
  "type": "object",
  "properties": {
    "accessPolicyId": {
      "type": "string",
      "description": "The ID of the access policy."
    },
    "accessPolicyIdentity": {
      "$ref": "#/$defs/Identity"
    },
    "accessPolicyResource": {
      "$ref": "#/$defs/Resource"
    },
    "accessPolicyPermission": {
      "type": "string",
      "enum": [
        "ADMINISTRATOR",
        "VIEWER"
      ],
      "description": "The permission level for this access policy. Note that a project ADMINISTRATOR is also known as a project owner."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required."
    }
  },
  "required": [
    "accessPolicyId",
    "accessPolicyIdentity",
    "accessPolicyResource",
    "accessPolicyPermission"
  ],
  "$defs": {
    "GroupIdentity": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The IAM Identity Center ID of the group."
        }
      },
      "required": [
        "id"
      ]
    },
    "IAMRoleIdentity": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "The ARN of the IAM role. For more information, see IAM ARNs in the IAM User Guide."
        }
      },
      "required": [
        "arn"
      ]
    },
    "IAMUserIdentity": {
      "type": "object",
      "properties": {
        "arn": {
          "type": "string",
          "description": "The ARN of the IAM user. For more information, see IAM ARNs in the IAM User Guide. If you delete the IAM user, access policies that contain this identity include an empty arn. You can delete the access policy for the IAM user that no longer exists."
        }
      },
      "required": [
        "arn"
      ]
    },
    "Identity": {
      "type": "object",
      "properties": {
        "user": {
          "$ref": "#/$defs/UserIdentity"
        },
        "group": {
          "$ref": "#/$defs/GroupIdentity"
        },
        "iamUser": {
          "$ref": "#/$defs/IAMUserIdentity"
        },
        "iamRole": {
          "$ref": "#/$defs/IAMRoleIdentity"
        }
      }
    },
    "PortalResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the portal."
        }
      },
      "required": [
        "id"
      ]
    },
    "ProjectResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the project."
        }
      },
      "required": [
        "id"
      ]
    },
    "Resource": {
      "type": "object",
      "properties": {
        "portal": {
          "$ref": "#/$defs/PortalResource"
        },
        "project": {
          "$ref": "#/$defs/ProjectResource"
        }
      }
    },
    "UserIdentity": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The IAM Identity Center ID of the user."
        }
      },
      "required": [
        "id"
      ]
    }
  }
}