---
title: "Create or update a managed hosting environment."
method: PUT
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}"
tags: ["ManagedHostingEnvironments"]
---

# Create or update a managed hosting environment.

`PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}`

## Path parameters

- `resourceGroupName` string, required
- `name` string, required
- `subscriptionId` string, required

## Query parameters

- `api-version` string, required

## Request body

- HostingEnvironment
  - `id` string — Resource Id
  - `name` string — Resource Name
  - `kind` string — Kind of resource
  - `location` string, required — Resource Location
  - `type` string — Resource type
  - `tags` object — Resource tags

## Response `202`

Asynchronous operation in progress

- HostingEnvironment
  - `id` string — Resource Id
  - `name` string — Resource Name
  - `kind` string — Kind of resource
  - `location` string, required — Resource Location
  - `type` string — Resource type
  - `tags` object — Resource tags

## Other responses

- `400` — Bad request
- `404` — Not found
- `409` — Conflict

---

[API](https://skmtc.dev/azure/apis/website-management-client.md) · [All operations](https://skmtc.dev/azure/apis/website-management-client/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/website-management-client/revisions/e6d8fbd68044/schema)
