Artículo
01/31/2024
11 colaboradores
Comentarios
En este artículo
Espacio de nombres: microsoft.graph
Nota: la API de Microsoft Graph para Intune requiere una licencia activa de Intune para el espacio empresarial.
Actualice las propiedades de un objeto windowsInformationProtectionNetworkLearningSummary .
Esta API está disponible en las siguientes implementaciones nacionales de nube .
Servicio global
Gobierno de EE. UU. L4
Us Government L5 (DOD)
China operada por 21Vianet
✅
✅
✅
✅
Permisos
Se requiere uno de los siguientes permisos para llamar a esta API. Para obtener más información, incluido cómo elegir permisos, vea Permisos .
Tipo de permiso
Permisos (de menos a más privilegiados)
Delegado (cuenta profesional o educativa)
DeviceManagementApps.ReadWrite.All
Delegado (cuenta personal de Microsoft)
No admitida.
Aplicación
DeviceManagementApps.ReadWrite.All
Solicitud HTTP
PATCH /deviceManagement/windowsInformationProtectionNetworkLearningSummaries/{windowsInformationProtectionNetworkLearningSummaryId}
Cuerpo de la solicitud
En el cuerpo de la solicitud, especifique una representación JSON del objeto windowsInformationProtectionNetworkLearningSummary .
En la tabla siguiente se muestran las propiedades necesarias para crear el objeto windowsInformationProtectionNetworkLearningSummary .
Propiedad
Tipo
Descripción
id
String
Identificador único para WindowsInformationProtectionNetworkLearningSummary.
url
String
Dirección URL del sitio web
deviceCount
Int32
Recuento de dispositivos
Respuesta
Si se ejecuta correctamente, este método devuelve un código de respuesta 200 OK
y un objeto windowsInformationProtectionNetworkLearningSummary actualizado en el cuerpo de la respuesta.
Ejemplo
Solicitud
Aquí tiene un ejemplo de la solicitud.
PATCH https://graph.microsoft.com/v1.0/deviceManagement/windowsInformationProtectionNetworkLearningSummaries/{windowsInformationProtectionNetworkLearningSummaryId}
Content-type: application/json
Content-length: 137
{
"@odata.type": "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",
"url": "Url value",
"deviceCount": 11
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new WindowsInformationProtectionNetworkLearningSummary
{
OdataType = "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",
Url = "Url value",
DeviceCount = 11,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.DeviceManagement.WindowsInformationProtectionNetworkLearningSummaries["{windowsInformationProtectionNetworkLearningSummary-id}"].PatchAsync(requestBody);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider , consulte la documentación del SDK .
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc device-management windows-information-protection-network-learning-summaries patch --windows-information-protection-network-learning-summary-id {windowsInformationProtectionNetworkLearningSummary-id} --body '{\
"@odata.type": "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",\
"url": "Url value",\
"deviceCount": 11\
}\
'
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider , consulte la documentación del SDK .
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
requestBody := graphmodels.NewWindowsInformationProtectionNetworkLearningSummary()
url := "Url value"
requestBody.SetUrl(&url)
deviceCount := int32(11)
requestBody.SetDeviceCount(&deviceCount)
windowsInformationProtectionNetworkLearningSummaries, err := graphClient.DeviceManagement().WindowsInformationProtectionNetworkLearningSummaries().ByWindowsInformationProtectionNetworkLearningSummaryId("windowsInformationProtectionNetworkLearningSummary-id").Patch(context.Background(), requestBody, nil)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider , consulte la documentación del SDK .
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
WindowsInformationProtectionNetworkLearningSummary windowsInformationProtectionNetworkLearningSummary = new WindowsInformationProtectionNetworkLearningSummary();
windowsInformationProtectionNetworkLearningSummary.setOdataType("#microsoft.graph.windowsInformationProtectionNetworkLearningSummary");
windowsInformationProtectionNetworkLearningSummary.setUrl("Url value");
windowsInformationProtectionNetworkLearningSummary.setDeviceCount(11);
WindowsInformationProtectionNetworkLearningSummary result = graphClient.deviceManagement().windowsInformationProtectionNetworkLearningSummaries().byWindowsInformationProtectionNetworkLearningSummaryId("{windowsInformationProtectionNetworkLearningSummary-id}").patch(windowsInformationProtectionNetworkLearningSummary);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider , consulte la documentación del SDK .
const options = {
authProvider,
};
const client = Client.init(options);
const windowsInformationProtectionNetworkLearningSummary = {
'@odata.type': '#microsoft.graph.windowsInformationProtectionNetworkLearningSummary',
url: 'Url value',
deviceCount: 11
};
await client.api('/deviceManagement/windowsInformationProtectionNetworkLearningSummaries/{windowsInformationProtectionNetworkLearningSummaryId}')
.update(windowsInformationProtectionNetworkLearningSummary);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider , consulte la documentación del SDK .
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\WindowsInformationProtectionNetworkLearningSummary;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new WindowsInformationProtectionNetworkLearningSummary();
$requestBody->setOdataType('#microsoft.graph.windowsInformationProtectionNetworkLearningSummary');
$requestBody->setUrl('Url value');
$requestBody->setDeviceCount(11);
$result = $graphServiceClient->deviceManagement()->windowsInformationProtectionNetworkLearningSummaries()->byWindowsInformationProtectionNetworkLearningSummaryId('windowsInformationProtectionNetworkLearningSummary-id')->patch($requestBody)->wait();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider , consulte la documentación del SDK .
Import-Module Microsoft.Graph.DeviceManagement
$params = @{
"@odata.type" = "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary"
url = "Url value"
deviceCount = 11
}
Update-MgDeviceManagementWindowsInformationProtectionNetworkLearningSummary -WindowsInformationProtectionNetworkLearningSummaryId $windowsInformationProtectionNetworkLearningSummaryId -BodyParameter $params
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider , consulte la documentación del SDK .
from msgraph import GraphServiceClient
from msgraph.generated.models.windows_information_protection_network_learning_summary import WindowsInformationProtectionNetworkLearningSummary
graph_client = GraphServiceClient(credentials, scopes)
request_body = WindowsInformationProtectionNetworkLearningSummary(
odata_type = "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",
url = "Url value",
device_count = 11,
)
result = await graph_client.device_management.windows_information_protection_network_learning_summaries.by_windows_information_protection_network_learning_summary_id('windowsInformationProtectionNetworkLearningSummary-id').patch(request_body)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider , consulte la documentación del SDK .
Respuesta
Aquí tiene un ejemplo de la respuesta. Nota: Es posible que el objeto de respuesta que aparezca aquí esté truncado para abreviar. Todas las propiedades se devolverán desde una llamada real.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 186
{
"@odata.type": "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary",
"id": "242108f7-08f7-2421-f708-2124f7082124",
"url": "Url value",
"deviceCount": 11
}