{
  "name": "AssignDirectoryRole",
  "plane": "control",
  "terraformEligible": false,
  "protocol": {
    "kind": "rest",
    "method": "PUT",
    "path": "/auth/directory/members/{memberId}/role",
    "query": [],
    "headers": [
      "authorization"
    ],
    "body": true
  },
  "requestBody": "json",
  "responseBody": "json",
  "requestSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "definitions": {
      "CloudRole": {
        "description": "Directory CloudRole. Wire spelling matches JWT `cloud_role` (`readonly`, not `read_only`).",
        "enum": [
          "owner",
          "admin",
          "developer",
          "billing",
          "readonly"
        ],
        "type": "string"
      }
    },
    "properties": {
      "memberId": {
        "type": "string"
      },
      "role": {
        "$ref": "#/definitions/CloudRole"
      }
    },
    "required": [
      "memberId",
      "role"
    ],
    "title": "AssignDirectoryRoleRequest",
    "type": "object"
  },
  "responseSchema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
      "CloudRole": {
        "description": "Directory CloudRole. Wire spelling matches JWT `cloud_role` (`readonly`, not `read_only`).",
        "enum": [
          "owner",
          "admin",
          "developer",
          "billing",
          "readonly"
        ],
        "type": "string"
      }
    },
    "properties": {
      "cloudRole": {
        "anyOf": [
          {
            "$ref": "#/definitions/CloudRole"
          },
          {
            "type": "null"
          }
        ]
      },
      "email": {
        "type": "string"
      },
      "memberId": {
        "type": "string"
      },
      "tenantId": {
        "type": "string"
      }
    },
    "required": [
      "email",
      "memberId",
      "tenantId"
    ],
    "title": "DirectoryMember",
    "type": "object"
  }
}
