Actualizar deviceManagementSettingDefinitionUpdate deviceManagementSettingDefinition

Espacio de nombres: microsoft.graphNamespace: microsoft.graph

Importante: Las API de Microsoft Graph en la versión/beta están sujetas a cambios; no se admite el uso de producción.Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.

Nota: la API de Microsoft Graph para Intune requiere una licencia activa de Intune para el espacio empresarial.Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.

Actualice las propiedades de un objeto deviceManagementSettingDefinition .Update the properties of a deviceManagementSettingDefinition object.

Requisitos previosPrerequisites

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.One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Tipo de permisoPermission type Permisos (de más a menos privilegiados)Permissions (from most to least privileged)
Delegado (cuenta profesional o educativa)Delegated (work or school account) DeviceManagementConfiguration.ReadWrite.AllDeviceManagementConfiguration.ReadWrite.All
Delegado (cuenta personal de Microsoft)Delegated (personal Microsoft account) No admitida.Not supported.
ApplicationApplication DeviceManagementConfiguration.ReadWrite.AllDeviceManagementConfiguration.ReadWrite.All

Solicitud HTTPHTTP Request

PATCH /deviceManagement/settingDefinitions/{deviceManagementSettingDefinitionId}
PATCH /deviceManagement/categories/{deviceManagementSettingCategoryId}/settingDefinitions/{deviceManagementSettingDefinitionId}
PATCH /deviceManagement/intents/{deviceManagementIntentId}/categories/{deviceManagementIntentSettingCategoryId}/settingDefinitions/{deviceManagementSettingDefinitionId}
PATCH /deviceManagement/templates/{deviceManagementTemplateId}/categories/{deviceManagementTemplateSettingCategoryId}/settingDefinitions/{deviceManagementSettingDefinitionId}

Encabezados de solicitudRequest headers

EncabezadoHeader ValorValue
AuthorizationAuthorization Se requiere <token> de portador.Bearer <token> Required.
AceptarAccept application/jsonapplication/json

Cuerpo de solicitudRequest body

En el cuerpo de la solicitud, especifique una representación JSON del objeto deviceManagementSettingDefinition .In the request body, supply a JSON representation for the deviceManagementSettingDefinition object.

En la tabla siguiente se muestran las propiedades necesarias para crear el deviceManagementSettingDefinition.The following table shows the properties that are required when you create the deviceManagementSettingDefinition.

PropiedadProperty TipoType DescripciónDescription
idid CadenaString Identificador de la definición de configuración.The ID of the setting definition
valueTypevalueType deviceManangementIntentValueTypedeviceManangementIntentValueType El tipo de datos del valor.The data type of the value. Los valores posibles son: integer, boolean, string, complex, collection, abstractComplex.Possible values are: integer, boolean, string, complex, collection, abstractComplex.
displayNamedisplayName CadenaString El nombre para mostrar del valorThe setting's display name
isTopLevelisTopLevel BooleanBoolean Si la configuración es de nivel superior, se puede configurar sin que sea necesario incluirla en una configuración de colección o compleja.If the setting is top level, it can be configured without the need to be wrapped in a collection or complex setting
descriptiondescription CadenaString La descripción de la configuraciónThe setting's description
placeholderTextplaceholderText CadenaString Texto de marcador de posición como ejemplo de entrada válidaPlaceholder text as an example of valid input
documentationUrldocumentationUrl CadenaString Dirección URL para establecer la documentaciónUrl to setting documentation
keywordskeywords Colección StringString collection Palabras clave asociadas a la configuraciónKeywords associated with the setting
restriccionesconstraints colección deviceManagementConstraintdeviceManagementConstraint collection Colección de restricciones para el valor de configuraciónCollection of constraints for the setting value
dependenciasdependencies colección deviceManagementSettingDependencydeviceManagementSettingDependency collection Colección de dependencias en otras opciones de configuraciónCollection of dependencies on other settings

RespuestaResponse

Si se ejecuta correctamente, este método devuelve un 200 OK código de respuesta y un objeto deviceManagementSettingDefinition actualizado en el cuerpo de la respuesta.If successful, this method returns a 200 OK response code and an updated deviceManagementSettingDefinition object in the response body.

EjemploExample

SolicitudRequest

Aquí tiene un ejemplo de la solicitud.Here is an example of the request.

PATCH https://graph.microsoft.com/beta/deviceManagement/settingDefinitions/{deviceManagementSettingDefinitionId}
Content-type: application/json
Content-length: 928

{
  "@odata.type": "#microsoft.graph.deviceManagementSettingDefinition",
  "valueType": "boolean",
  "displayName": "Display Name value",
  "isTopLevel": true,
  "description": "Description value",
  "placeholderText": "Placeholder Text value",
  "documentationUrl": "https://example.com/documentationUrl/",
  "keywords": [
    "Keywords value"
  ],
  "constraints": [
    {
      "@odata.type": "microsoft.graph.deviceManagementSettingAppConstraint",
      "supportedTypes": [
        "Supported Types value"
      ]
    }
  ],
  "dependencies": [
    {
      "@odata.type": "microsoft.graph.deviceManagementSettingDependency",
      "definitionId": "Definition Id value",
      "constraints": [
        {
          "@odata.type": "microsoft.graph.deviceManagementSettingAppConstraint",
          "supportedTypes": [
            "Supported Types value"
          ]
        }
      ]
    }
  ]
}

RespuestaResponse

Aquí tiene un ejemplo de la respuesta. Nota: Puede que el objeto de respuesta que aparece aquí se trunque para abreviar. Todas las propiedades se devolverán de una llamada real.Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 977

{
  "@odata.type": "#microsoft.graph.deviceManagementSettingDefinition",
  "id": "4ec3093d-093d-4ec3-3d09-c34e3d09c34e",
  "valueType": "boolean",
  "displayName": "Display Name value",
  "isTopLevel": true,
  "description": "Description value",
  "placeholderText": "Placeholder Text value",
  "documentationUrl": "https://example.com/documentationUrl/",
  "keywords": [
    "Keywords value"
  ],
  "constraints": [
    {
      "@odata.type": "microsoft.graph.deviceManagementSettingAppConstraint",
      "supportedTypes": [
        "Supported Types value"
      ]
    }
  ],
  "dependencies": [
    {
      "@odata.type": "microsoft.graph.deviceManagementSettingDependency",
      "definitionId": "Definition Id value",
      "constraints": [
        {
          "@odata.type": "microsoft.graph.deviceManagementSettingAppConstraint",
          "supportedTypes": [
            "Supported Types value"
          ]
        }
      ]
    }
  ]
}