[metadata]
asset_id: api/resources/resource-groups/create-or-update
author: kexugit
breadcrumb_path: ../../../breadcrumb/toc.json
cmProducts: https://authoring-docs-microsoft.poolparty.biz/devrel/4e834929-0ce1-4c1d-9c81-fcb14721edfb
color-scheme: light dark
default_moniker: rest-resources-2021-04-01
depot_name: Azure.AzureRestApi
description: Learn more about Resource Management service - Creates or updates a resource group.
enable_rest_try_it: true
feedback_system: None
git_commit_id: 388178c1cc6333cd0c5157e04379eafaca602b68
gitcommit: https://github.com/MicrosoftDocs/azure-docs-rest-apis/blob/388178c1cc6333cd0c5157e04379eafaca602b68/docs-ref-autogen/resources/rest-resources-2021-04-01/Resource-Groups/Create-Or-Update.yml
github_feedback_content_git_url: https://github.com/MicrosoftDocs/azure-docs-rest-apis/blob/main/docs-ref-autogen/resources/rest-resources-2021-04-01/Resource-Groups/Create-Or-Update.yml
item_type: Content
locale: en-us
manager: smmark
markdown_url: https://learn.microsoft.com/en-us/rest/api/resources/resource-groups/create-or-update?view=rest-resources-2021-04-01&accept=text/markdown
moniker_definition_rel: ../../../.monikers.Azure.AzureRestApi.json
monikers: rest-resources-2021-04-01
ms.author: kexu
ms.date: 2024-05-07T00:00:00Z
ms.devlang: rest-api
ms.service: azure-resource-manager
ms.topic: generated-reference
og:description: Learn more about Resource Management service - Creates or updates a resource group.
og:image: https://learn.microsoft.com/en-us/media/open-graph-image.png
og:image:alt: Microsoft Learn
og:title: Resource Groups - Create Or Update - REST API (Azure Resource Management)
og:type: website
og:url: https://learn.microsoft.com/en-us/rest/api/resources/resource-groups/create-or-update?view=rest-resources-2021-04-01
original_content_git_url: https://github.com/MicrosoftDocs/azure-docs-rest-apis/blob/live/docs-ref-autogen/resources/rest-resources-2021-04-01/Resource-Groups/Create-Or-Update.yml
page_kind: operation
page_type: rest
platform_id: 1f908cc7-b007-ca09-db4a-e3951b98e51c
products: https://authoring-docs-microsoft.poolparty.biz/devrel/4e834929-0ce1-4c1d-9c81-fcb14721edfb
rest_product: Azure
schema: RESTOperation
scope: Azure,REST
site_name: Docs
source_path: docs-ref-autogen/resources/rest-resources-2021-04-01/Resource-Groups/Create-Or-Update.yml
spProducts: https://authoring-docs-microsoft.poolparty.biz/devrel/75670257-a3f0-4627-9981-8046f99219e6
toc_rel: ../../azure/toc.json
twitter:card: summary_large_image
twitter:site: @MicrosoftLearn
uhfHeaderId: azure
uid: management.azure.com.resources.resourcegroups.createorupdate
updated_at: 2025-12-09T22:14:00Z
use_moniker_list: 1
viewport: width=device-width, initial-scale=1.0

[canonical-links]
https://learn.microsoft.com/en-us/rest/api/resources/resource-groups/create-or-update?view=rest-resources-2021-04-01

[document-links]
AI Disclaimer: https://learn.microsoft.com/en-us/principles-for-ai-generated-content
Blog: https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog
Consumer Health Privacy: https://go.microsoft.com/fwlink/?linkid=2259814
Contribute: https://learn.microsoft.com/en-us/contribute
Download Microsoft Edge: https://go.microsoft.com/fwlink/p/?LinkID=2092881
Edit: https://github.com/MicrosoftDocs/azure-docs-rest-apis/blob/main/docs-ref-autogen/resources/rest-resources-2021-04-01/Resource-Groups/Create-Or-Update.yml
More info about Internet Explorer and Microsoft Edge: https://learn.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-edge
Previous Versions: https://learn.microsoft.com/en-us/previous-versions/
Privacy: https://go.microsoft.com/fwlink/?LinkId=521839
Terms of Use: https://learn.microsoft.com/en-us/legal/termsofuse
Trademarks: https://www.microsoft.com/legal/intellectualproperty/Trademarks/
Your Privacy Choices: https://aka.ms/yourcaliforniaprivacychoices

[content]
Resource Groups - Create Or Update - REST API (Azure Resource Management) | Microsoft Learn
Skip to main content
Skip to in-page navigation
Skip to Ask Learn chat experience
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Download Microsoft Edge
More info about Internet Explorer and Microsoft Edge
Table of contents
Exit editor mode
Ask Learn
Ask Learn
Reading mode
Table of contents
Read in English
Add
Add to Plans
Edit
Copy Markdown
Print
Note
Access to this page requires authorization. You can try
signing in
or
changing directories
.
Access to this page requires authorization. You can try
changing directories
.
Resource Groups - Create Or Update
Service:
Resource Management
API Version:
2021-04-01
Creates or updates a resource group.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}?api-version=2021-04-01
URI Parameters
Name
In
Required
Type
Description
resource
Group
Name
path
True
string
minLength: 1
maxLength: 90
pattern: ^[-\w\._\(\)]+$
The name of the resource group to create or update. Can include alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that match the allowed characters.
subscription
Id
path
True
string
The Microsoft Azure subscription ID.
api-version
query
True
string
The API version to use for this operation.
Request Body
Name
Required
Type
Description
location
True
string
The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
managedBy
string
The ID of the resource that manages this resource group.
properties
Resource
Group
Properties
The resource group properties.
tags
object
The tags attached to the resource group.
Responses
Name
Type
Description
200 OK
Resource
Group
OK - Returns information about the new resource group.
201 Created
Resource
Group
Created - Returns information about the new resource group.
Other Status Codes
Cloud
Error
Error response describing why the operation failed.
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name
Description
user_impersonation
impersonate your user account
Examples
Create or update a resource group
Sample request
HTTP
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group?api-version=2021-04-01 { "location": "eastus" }
Sample response
Status code:
201
{ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group", "name": "my-resource-group", "location": "eastus", "properties": { "provisioningState": "Succeeded" } }
Status code:
200
{ "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group", "name": "my-resource-group", "location": "eastus", "properties": { "provisioningState": "Succeeded" } }
Definitions
Name
Description
Cloud
Error
An error response for a resource management request.
Error
Additional
Info
The resource management error additional info.
Error
Response
Error Response
Resource
Group
Resource group information.
Resource
Group
Properties
The resource group properties.
Cloud
Error
Object
An error response for a resource management request.
Name
Type
Description
error
Error
Response
Error Response
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)
Error
Additional
Info
Object
The resource management error additional info.
Name
Type
Description
info
object
The additional info.
type
string
The additional info type.
Error
Response
Object
Error Response
Name
Type
Description
additionalInfo
Error
Additional
Info
[]
The error additional info.
code
string
The error code.
details
Error
Response
[]
The error details.
message
string
The error message.
target
string
The error target.
Resource
Group
Object
Resource group information.
Name
Type
Description
id
string
The ID of the resource group.
location
string
The location of the resource group. It cannot be changed after the resource group has been created. It must be one of the supported Azure locations.
managedBy
string
The ID of the resource that manages this resource group.
name
string
The name of the resource group.
properties
Resource
Group
Properties
The resource group properties.
tags
object
The tags attached to the resource group.
type
string
The type of the resource group.
Resource
Group
Properties
Object
The resource group properties.
Name
Type
Description
provisioningState
string
The provisioning state.
In this article
en-us
Your Privacy Choices
Theme
Light
Dark
High contrast
AI Disclaimer
Previous Versions
Blog
Contribute
Privacy
Consumer Health Privacy
Terms of Use
Trademarks
© Microsoft 2026
