{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure/json-schema/microsoft-azure-role-assignment-create-parameters-schema.json",
  "title": "RoleAssignmentCreateParameters",
  "description": "Role assignment create parameters.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-role-assignments-api-openapi.yml#/components/schemas/RoleAssignmentCreateParameters",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/RoleAssignmentProperties",
      "description": "Role assignment properties.",
      "x-ms-client-flatten": true
    }
  },
  "required": [
    "properties"
  ],
  "$defs": {
    "RoleAssignmentProperties": {
      "type": "object",
      "description": "Role assignment properties.",
      "properties": {
        "scope": {
          "type": "string",
          "description": "The role assignment scope.",
          "readOnly": true
        },
        "roleDefinitionId": {
          "type": "string",
          "description": "The role definition ID."
        },
        "principalId": {
          "type": "string",
          "description": "The principal ID."
        },
        "principalType": {
          "type": "string",
          "description": "The principal type of the assigned principal ID.",
          "default": "User",
          "enum": [
            "User",
            "Group",
            "ServicePrincipal",
            "ForeignGroup",
            "Device",
            "AgentUser",
            "AgentServicePrincipal"
          ],
          "x-ms-enum": {
            "name": "PrincipalType",
            "modelAsString": true,
            "values": [
              {
                "name": "User",
                "value": "User",
                "description": "User"
              },
              {
                "name": "Group",
                "value": "Group",
                "description": "Group"
              },
              {
                "name": "ServicePrincipal",
                "value": "ServicePrincipal",
                "description": "ServicePrincipal"
              },
              {
                "name": "ForeignGroup",
                "value": "ForeignGroup",
                "description": "ForeignGroup"
              },
              {
                "name": "Device",
                "value": "Device",
                "description": "Device"
              },
              {
                "name": "AgentUser",
                "value": "AgentUser",
                "description": "Agent identity derived from a user."
              },
              {
                "name": "AgentServicePrincipal",
                "value": "AgentServicePrincipal",
                "description": "Agent identity derived from a service principal."
              }
            ]
          }
        },
        "description": {
          "type": "string",
          "description": "Description of role assignment"
        },
        "condition": {
          "type": "string",
          "description": "The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'"
        },
        "conditionVersion": {
          "type": "string",
          "description": "Version of the condition. Currently the only accepted value is '2.0'"
        },
        "createdOn": {
          "type": "string",
          "format": "date-time",
          "description": "Time it was created",
          "readOnly": true
        },
        "updatedOn": {
          "type": "string",
          "format": "date-time",
          "description": "Time it was updated",
          "readOnly": true
        },
        "createdBy": {
          "type": "string",
          "description": "Id of the user who created the assignment",
          "readOnly": true
        },
        "updatedBy": {
          "type": "string",
          "description": "Id of the user who updated the assignment",
          "readOnly": true
        },
        "delegatedManagedIdentityResourceId": {
          "type": "string",
          "description": "Id of the delegated managed identity resource"
        }
      },
      "required": [
        "roleDefinitionId",
        "principalId"
      ]
    }
  }
}