Erstellen von deviceManagementReusablePolicySetting
Namespace: microsoft.graph
Wichtig: Microsoft Graph-APIs unter der /beta-Version können sich ändern. Die Verwendung in der Produktion wird nicht unterstützt.
Hinweis: Die Microsoft Graph-API für Intune setzt eine aktive Intune-Lizenz für den Mandanten voraus.
Erstellen Sie ein neues deviceManagementReusablePolicySetting-Objekt .
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
Globaler Dienst | US Government L4 | US Government L5 (DOD) | China, betrieben von 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
Berechtigungen
Eine der nachfolgenden Berechtigungen ist erforderlich, um diese API aufrufen zu können. Weitere Informationen, unter anderem zur Auswahl von Berechtigungen, finden Sie unter Berechtigungen.
Berechtigungstyp | Berechtigungen (von der Berechtigung mit den wenigsten Rechten zu der mit den meisten Rechten) |
---|---|
Delegiert (Geschäfts-, Schul- oder Unikonto) | DeviceManagementConfiguration.ReadWrite.All |
Delegiert (persönliches Microsoft-Konto) | Nicht unterstützt |
Anwendung | DeviceManagementConfiguration.ReadWrite.All |
HTTP-Anforderung
POST /deviceManagement/reusablePolicySettings
Anforderungsheader
Kopfzeile | Wert |
---|---|
Authorization | Bearer {token}. Erforderlich. Erfahren Sie mehr über die Authentifizierung und Autorisierung. |
Annehmen | application/json |
Anforderungstext
Geben Sie im Anforderungstext eine JSON-Darstellung für das deviceManagementReusablePolicySetting-Objekt an.
In der folgenden Tabelle sind die Eigenschaften aufgeführt, die beim Erstellen von deviceManagementReusablePolicySetting erforderlich sind.
Eigenschaft | Typ | Beschreibung |
---|---|---|
id | Zeichenfolge | vom System generierte wiederverwendbare Einstellungs-ID. |
displayName | Zeichenfolge | Anzeigename der wiederverwendbaren Einstellung, der vom Benutzer angegeben wird. |
description | Zeichenfolge | Beschreibung der wiederverwendbaren Einstellung, die vom Benutzer bereitgestellt wird. |
settingDefinitionId | Zeichenfolge | Einstellungsdefinitions-ID, die dieser wiederverwendbaren Einstellung zugeordnet ist. |
settingInstance | deviceManagementConfigurationSettingInstance | Konfigurationsinstanz für wiederverwendbare Einstellungen |
createdDateTime | DateTimeOffset | Erstellungsdatum und -uhrzeit der wiederverwendbaren Einstellung. Diese Eigenschaft ist schreibgeschützt. |
lastModifiedDateTime | DateTimeOffset | Datum und Uhrzeit der letzten Änderung der wiederverwendbaren Einstellung. Diese Eigenschaft ist schreibgeschützt. |
Version | Int32 | Versionsnummer für wiederverwendbare Einstellung. Gültige Werte 0 bis 2147483647. Diese Eigenschaft ist schreibgeschützt. |
referencingConfigurationPolicyCount | Int32 | Anzahl der Konfigurationsrichtlinien, die auf die aktuelle wiederverwendbare Einstellung verweisen. Gültige Werte 0 bis 2147483647. Diese Eigenschaft ist schreibgeschützt. |
Antwort
Bei erfolgreicher Ausführung gibt die Methode den 201 Created
Antwortcode und ein deviceManagementReusablePolicySetting-Objekt im Antworttext zurück.
Beispiel
Anforderung
Nachfolgend sehen Sie ein Beispiel der Anforderung.
POST https://graph.microsoft.com/beta/deviceManagement/reusablePolicySettings
Content-type: application/json
Content-length: 16328
{
"@odata.type": "#microsoft.graph.deviceManagementReusablePolicySetting",
"displayName": "Display Name value",
"description": "Description value",
"settingDefinitionId": "Setting Definition Id value",
"settingInstance": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": null,
"settingInstanceTemplateReference": null,
"choiceSettingValue": null
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
},
"version": 7,
"referencingConfigurationPolicyCount": 3
}
Antwort
Nachfolgend sehen Sie ein Beispiel der Antwort. Hinweis: Das hier gezeigte Antwortobjekt ist möglicherweise aus Platzgründen abgeschnitten. Von einem tatsächlichen Aufruf werden alle Eigenschaften zurückgegeben.
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 16500
{
"@odata.type": "#microsoft.graph.deviceManagementReusablePolicySetting",
"id": "7a4f9bd7-9bd7-7a4f-d79b-4f7ad79b4f7a",
"displayName": "Display Name value",
"description": "Description value",
"settingDefinitionId": "Setting Definition Id value",
"settingInstance": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": "Setting Definition Id value",
"settingInstanceTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingInstanceTemplateReference",
"settingInstanceTemplateId": "Setting Instance Template Id value"
},
"choiceSettingValue": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingValue",
"settingValueTemplateReference": {
"@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference",
"settingValueTemplateId": "Setting Value Template Id value",
"useTemplateDefault": true
},
"value": "Value value",
"children": [
{
"@odata.type": "microsoft.graph.deviceManagementConfigurationChoiceSettingInstance",
"settingDefinitionId": null,
"settingInstanceTemplateReference": null,
"choiceSettingValue": null
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
},
"createdDateTime": "2017-01-01T00:02:43.5775965-08:00",
"lastModifiedDateTime": "2017-01-01T00:00:35.1329464-08:00",
"version": 7,
"referencingConfigurationPolicyCount": 3
}