---
title: "Create or update the metadata of a Windows IoT Device Service."
method: PUT
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsIoT/deviceServices/{deviceName}"
tags: ["DeviceServices"]
---

# Create or update the metadata of a Windows IoT Device Service.

`PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.WindowsIoT/deviceServices/{deviceName}`

Create or update the metadata of a Windows IoT Device Service. The usual pattern to modify a property is to retrieve the Windows IoT Device Service metadata and security metadata, and then combine them with the modified values in a new body to update the Windows IoT Device Service.

## Path parameters

- `subscriptionId` string, required
- `resourceGroupName` string, required
- `deviceName` string, required

## Query parameters

- `api-version` string, required

## Headers

- `If-Match` string

## Request body

- DeviceService — The core properties of ARM resources
  - `id` string — Fully qualified resource Id for the resource
  - `name` string — The name of the resource
  - `type` string — The type of the resource.

## Response `200`

OK. The request has succeeded.

- DeviceService — The core properties of ARM resources
  - `id` string — Fully qualified resource Id for the resource
  - `name` string — The name of the resource
  - `type` string — The type of the resource.

## Other responses

- `201` — OK. The request has succeeded.
- `default` — DefaultErrorResponse

---

[API](https://skmtc.net/azure/apis/deviceservices.md) · [All operations](https://skmtc.net/azure/apis/deviceservices/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/deviceservices/versions/152fd9003ee4/schema)
