schemaExtension 资源类型(架构扩展)schemaExtension resource type (schema extensions)

可以通过架构扩展定义架构来扩展强类型的自定义数据并将其添加到资源类型。自定义数据在扩展资源上作为复杂类型显示。Schema extensions allow you to define a schema to extend and add strongly-typed custom data to a resource type. The custom data appears as a complex type on the extended resource.

以下资源类型支持架构扩展:Schema extensions are supported by the following resource types:

请参阅架构扩展示例了解如何将自定义数据添加到组。See the schema extension example to learn how to add custom data to groups.

方法Methods

方法Method 返回类型Return Type 说明Description
CreateCreate schemaExtensionschemaExtension 创建架构扩展定义。Create a schema extension definition.
ListList schemaExtensionschemaExtension 列出可用的 schemaExtension 定义及其属性。List the available schemaExtension definitions and their properties.
GetGet schemaExtensionschemaExtension 读取特定的 schemaExtension 定义的属性。Read the properties of a specific schemaExtension definition.
UpdateUpdate schemaExtensionschemaExtension 更新 schemaExtension 定义。Update a schemaExtension definition.
DeleteDelete None 删除 schemaExtension 定义。Delete a schemaExtension definition.

属性Properties

属性Property 类型Type 说明Description
说明description StringString 架构扩展的说明。Description for the schema extension.
idid StringString 架构扩展定义的唯一标识符。The unique identifier for the schema extension definition.
你可以使用下面两种方法之一分配值:You can assign a value in one of two ways:
  • 连接已验证域名与架构扩展名称,形成此格式的唯一字符串:{domainName}_{schemaName}。例如 contoso_mySchemaConcatenate the name of one of your verified domains with a name for the schema extension to form a unique string in this format, {domainName}_{schemaName}. As an example, contoso_mySchema.
  • 提供一个架构名称,并让 Microsoft Graph 使用此格式的架构名称完成 id 分配:ext{8-random-alphanumeric-chars}_{schema-name}。例如 extkvbmkofy_mySchemaProvide a schema name, and let Microsoft Graph use that schema name to complete the id assignment in this format: ext{8-random-alphanumeric-chars}_{schema-name}. An example would be extkvbmkofy_mySchema.
此属性一旦创建,便无法更改。This property cannot be changed after creation.
ownerowner StringString 属于架构扩展的所有者的应用程序的 appIdThe appId of the application that is the owner of the schema extension. 可在创建时提供此属性以设置所有者。This property can be supplied on creation, to set the owner. 如果未提供,则会将调用应用程序的 appId 设置为所有者。If not supplied, then the calling application's appId will be set as the owner. 在任一情况下,已登录用户均必须是应用程序的所有者。In either case, the signed-in user must be the owner of the application. 设置后,此属性为只读,且无法更改。Once set, this property is read-only and cannot be changed.
propertiesproperties extensionSchemaProperty 集合extensionSchemaProperty collection 构成架构扩展定义的属性名称和类型的集合。The collection of property names and types that make up the schema extension definition.
statusstatus StringString 架构扩展的生命周期状态。The lifecycle state of the schema extension. 可能的状态为 InDevelopmentAvailableDeprecatedPossible states are InDevelopment, Available, and Deprecated. 创建后将自动设置为 InDevelopmentAutomatically set to InDevelopment on creation. 架构扩展将提供关于可能的状态转换和行为的详细信息。Schema extensions provides more information on the possible state transitions and behaviors.
targetTypestargetTypes String collectionString collection 架构扩展适用的支持扩展的 Microsoft Graph 类型集。Set of Microsoft Graph types (that can support extensions) that the schema extension can be applied to. 联系人设备事件邮件组织帖子用户中选择。Select from contact, device, event, group, message, organization, post, or user.

JSON 表示形式JSON representation

下面是资源的 JSON 表示形式。Here is a JSON representation of the resource.

{
  "description": "String",
  "id": "String (identifier)",
  "owner": "String",
  "properties": [{"@odata.type": "microsoft.graph.extensionSchemaProperty"}],
  "status": "String",
  "targetTypes": ["String"]
}