[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]
.NET: /en-us/dotnet/azure/
2016-09-01: ?view=rest-resources-2016-09-01
2020-10-01: ?view=rest-resources-2020-10-01
2021-04-01: ?view=rest-resources-2021-04-01
2021-05-01: ?view=rest-resources-2021-05-01
2021-07-01: ?view=rest-resources-2021-07-01
2022-05-01: ?view=rest-resources-2022-05-01
2022-06-01: ?view=rest-resources-2022-06-01
2022-08-01-preview: ?view=rest-resources-2022-08-01-preview
2022-11-01-preview: ?view=rest-resources-2022-11-01-preview
2022-12-01: ?view=rest-resources-2022-12-01
2023-11-01: ?view=rest-resources-2023-11-01
2025-04-01: ?view=rest-resources-2025-04-01
AI & machine learning: /en-us/azure/?product=ai-machine-learning
AI Disclaimer: https://learn.microsoft.com/en-us/principles-for-ai-generated-content
AI fundamentals: /en-us/training/paths/get-started-with-artificial-intelligence-on-azure/
Agents: /en-us/agents/
All product documentation: /en-us/docs/
All questions: /en-us/answers/questions/
All training: /en-us/training/
Analytics: /en-us/azure/?product=analytics
Analytics: https://learn.microsoft.com/en-us/users/me/analytics/
Artificial intelligence: /en-us/ai/
Ask a question: /en-us/answers/questions/ask/
Assessments: /en-us/assessments/
Azure App Service: /en-us/azure/app-service/
Azure Architecture Center: /en-us/azure/architecture/
Azure Architecture fundamentals: /en-us/training/paths/azure-fundamentals-describe-azure-architecture-services/
Azure CLI: /en-us/cli/azure/
Azure Databricks: /en-us/azure/databricks/
Azure DevOps: /en-us/azure/devops/
Azure Functions: /en-us/azure/azure-functions/
Azure Monitor: /en-us/azure/azure-monitor/
Azure Virtual Machines: /en-us/azure/virtual-machines/
Azure documentation: /en-us/azure/?product=popular
Azure questions: /en-us/answers/tags/133/azure/
Azure training: /en-us/training/browse/?products=azure
Azure updates: https://azure.microsoft.com/updates
Azure: /en-us/azure/
Blog: https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog
Career paths: /en-us/training/career-paths/
Cloud Adoption Framework: /en-us/azure/cloud-adoption-framework/
Cloud concepts: /en-us/training/paths/microsoft-azure-fundamentals-describe-cloud-concepts/
Code samples: /en-us/samples/
Compute: /en-us/azure/?product=compute
Consumer Health Privacy: https://go.microsoft.com/fwlink/?linkid=2259814
Contribute: https://learn.microsoft.com/en-us/contribute
Cost management & billing: /en-us/azure/cost-management-billing/
Credentials: /en-us/credentials/
Databases: /en-us/azure/?product=databases
DevOps: /en-us/devops/
Download Microsoft Edge: https://go.microsoft.com/fwlink/p/?LinkID=2092881
Dynamics 365 documentation: /en-us/dynamics365/
Dynamics 365 training: /en-us/training/browse/?products=dynamics-365
Earn credentials: /en-us/credentials/browse/?products=azure
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
Educator center: /en-us/training/educator-center/
English (United States): /en-us/locale?target=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Frest%2Fapi%2Fresources%2Fresource-groups%2Fcreate-or-update%3Fview%3Drest-resources-2021-04-01%26tabs%3DHTTP
Get started with Azure: https://azure.microsoft.com/pricing/purchase-options/azure-account?cid=msft_learn_nav_1f908cc7-b007-ca09-db4a-e3951b98e51c
Instructor-led courses: /en-us/training/browse/?products=azure&resource_type=course
Intro to generative AI: /en-us/training/paths/introduction-generative-ai/
Java: /en-us/azure/developer/java/
JavaScript: /en-us/azure/developer/javascript/
Labs: /en-us/labs/
Latest blog posts: https://azure.microsoft.com/blog/
Learn for Organizations: /en-us/training/organizations/
Learn: /en-us/
Learn: https://learn.microsoft.com/en-us/?view=rest-resources-2021-04-01
Microsoft 365 documentation: /en-us/microsoft-365/
Microsoft 365 questions: /en-us/answers/tags/9/m365/
Microsoft 365 training: /en-us/training/browse/?products=m365
Microsoft Copilot documentation: /en-us/copilot/
Microsoft Copilot training: /en-us/training/browse/?products=ms-copilot
Microsoft Foundry: /en-us/azure/ai-foundry/
Microsoft Ignite | November 17-20, 2026: https://ignite.microsoft.com/home?wt.mc_ID=msignite26_gmee_corp_np_oo_MSLearnRegLaunch
Microsoft Outlook questions: /en-us/answers/tags/131/office-outlook/
Microsoft Power Platform training: /en-us/training/browse/?products=power-platform
Microsoft Teams questions: /en-us/answers/tags/108/office-teams/
Migration: /en-us/azure/migration/
More info about Internet Explorer and Microsoft Edge: https://learn.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-edge
Networking: /en-us/azure/?product=networking
Popular tags: /en-us/answers/tags/
Portal: https://portal.azure.com
Power Platform documentation: /en-us/power-platform/
PowerShell: /en-us/powershell/azure/
Previous Versions: https://learn.microsoft.com/en-us/previous-versions/
Pricing information: https://azure.microsoft.com/pricing/
Privacy: https://go.microsoft.com/fwlink/?LinkId=521839
Product overview: https://azure.microsoft.com/get-started
Profile: https://learn.microsoft.com/en-us/users/me/activity/
Python: /en-us/azure/developer/python/
Read in English: https://learn.microsoft.com/en-us/rest/api/resources/resource-groups/create-or-update?view=rest-resources-2021-04-01&tabs=HTTP
Resource Groups - Create Or Update - REST API (Azure Resource Management): https://learn.microsoft.com/en-us/rest/api/resources/resource-groups/create-or-update?view=rest-resources-2021-04-01
Security: /en-us/azure/?product=security
Security: /en-us/security/
Settings: https://learn.microsoft.com/en-us/users/me/settings/
Start your AI learning assessment: /en-us/assessments/1c032171-8ca0-4032-8962-a38a5cc424a8/
Startups hub: /en-us/startups/
Storage: /en-us/azure/?product=storage
Student hub: /en-us/training/student-hub/
Suggestions will filter as you type: /en-us/search/
Support options: https://azure.microsoft.com/support/options/
Terms of Use: https://learn.microsoft.com/en-us/legal/termsofuse
Trademarks: https://www.microsoft.com/legal/intellectualproperty/Trademarks/
Troubleshooting documentation: /en-us/troubleshoot/
Troubleshooting: /en-us/troubleshoot/azure/
View all developer resources: /en-us/azure/developer/
View all products: /en-us/azure/
View all training: /en-us/training/azure/
Well-Architected Framework: /en-us/azure/well-architected/
Windows questions: /en-us/answers/tags/60/windows/
Your Privacy Choices: https://aka.ms/yourcaliforniaprivacychoices
https://www.microsoft.com

[structured-data]
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","item":"https://learn.microsoft.com/en-us/?view=rest-resources-2021-04-01","name":"Learn","position":1},{"@type":"ListItem","name":"Resource Groups - Create Or Update - REST API (Azure Resource Management)","position":2}]}

[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
Learn
Suggestions will filter as you type
Sign in
Profile
Analytics
Settings
Sign out
Learn
Documentation
All product documentation
Azure documentation
Dynamics 365 documentation
Microsoft Copilot documentation
Microsoft 365 documentation
Power Platform documentation
Code samples
Troubleshooting documentation
Register now
Microsoft Ignite | November 17-20, 2026
Interactive learning, certifications, and direct access to experts all in one place.
Training & Labs
All training
Azure training
Dynamics 365 training
Microsoft Copilot training
Microsoft 365 training
Microsoft Power Platform training
Labs
Credentials
Career paths
Register now
Microsoft Ignite | November 17-20, 2026
Interactive learning, certifications, and direct access to experts all in one place.
Q&A
Ask a question
Azure questions
Windows questions
Microsoft 365 questions
Microsoft Outlook questions
Microsoft Teams questions
Popular tags
All questions
Register now
Microsoft Ignite | November 17-20, 2026
Interactive learning, certifications, and direct access to experts all in one place.
Topics
Agents
Key concepts and resources for agentic computing
Artificial intelligence
Curated resources for AI fluency with apps and services
DevOps
DevOps practices, Git version control and Agile methods
Learn for Organizations
Curated offerings from Microsoft to boost your team’s technical skills
Security
Guidance to help you tackle security challenges
Startups hub
Technical guidance to move toward enterprise readiness
Assessments
Interactive guidance with custom recommendations
Student hub
Self-paced and interactive training for students
Educator center
Resources for educators to bring technical innovation in their classroom
Register now
Microsoft Ignite | November 17-20, 2026
Interactive learning, certifications, and direct access to experts all in one place.
Suggestions will filter as you type
Sign in
Profile
Analytics
Settings
Sign out
Azure
Products
Popular products
Microsoft Foundry
Azure App Service
Azure Databricks
Azure DevOps
Azure Functions
Azure Monitor
Azure Virtual Machines
Popular categories
Compute
Networking
Storage
AI & machine learning
Analytics
Databases
Security
View all products
Architecture
Cloud Adoption Framework
Well-Architected Framework
Azure Architecture Center
Migration
Develop
Python
.NET
JavaScript
Java
PowerShell
Azure CLI
View all developer resources
Learn Azure
Start your AI learning assessment
Top learning paths
Cloud concepts
AI fundamentals
Intro to generative AI
Azure Architecture fundamentals
Earn credentials
Instructor-led courses
View all training
Troubleshooting
Resources
Product overview
Azure updates
Pricing information
Cost management & billing
Latest blog posts
Support options
More
Products
Popular products
Microsoft Foundry
Azure App Service
Azure Databricks
Azure DevOps
Azure Functions
Azure Monitor
Azure Virtual Machines
Popular categories
Compute
Networking
Storage
AI & machine learning
Analytics
Databases
Security
View all products
Architecture
Cloud Adoption Framework
Well-Architected Framework
Azure Architecture Center
Migration
Develop
Python
.NET
JavaScript
Java
PowerShell
Azure CLI
View all developer resources
Learn Azure
Start your AI learning assessment
Top learning paths
Cloud concepts
AI fundamentals
Intro to generative AI
Azure Architecture fundamentals
Earn credentials
Instructor-led courses
View all training
Troubleshooting
Resources
Product overview
Azure updates
Pricing information
Cost management & billing
Latest blog posts
Support options
Portal
Get started with Azure
Version
2021-04-01
2025-04-01
2023-11-01
2022-12-01
2022-11-01-preview
2022-08-01-preview
2022-06-01
2022-05-01
2021-07-01
2021-05-01
2021-04-01
2020-10-01
2016-09-01
Search
Suggestions will filter as you type
Resource Groups - Create Or Update - REST API (Azure Resource Management)
Table of contents
Exit editor mode
Learn
Learn
Ask Learn
Ask Learn
Reading mode
Table of contents
Read in English
Add to Collections
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
In this article
URI Parameters
Request Body
Responses
Security
Examples
Definitions
Show 2 more
Creates or updates a resource group.
HTTP
Copy
Try It
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}?api-version=2021-04-01
URI Parameters
Expand table
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
Expand table
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
Expand table
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
Expand table
Name
Description
user_impersonation
impersonate your user account
Examples
Create or update a resource group
Sample request
HTTP
HTTP
Copy
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
JSON
Copy
{
"id"
:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group"
,
"name"
:
"my-resource-group"
,
"location"
:
"eastus"
,
"properties"
: {
"provisioningState"
:
"Succeeded"
} }
Status code:
200
JSON
Copy
{
"id"
:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/my-resource-group"
,
"name"
:
"my-resource-group"
,
"location"
:
"eastus"
,
"properties"
: {
"provisioningState"
:
"Succeeded"
} }
Definitions
Expand table
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.
Expand table
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.
Expand table
Name
Type
Description
info
object
The additional info.
type
string
The additional info type.
Error
Response
Object
Error Response
Expand table
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.
Expand table
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.
Expand table
Name
Type
Description
provisioningState
string
The provisioning state.
Reading mode disabled
In this article
URI Parameters
Request Body
Responses
Security
Examples
Definitions
Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in
English (United States)
Your Privacy Choices
Theme
Light
Dark
High contrast
AI Disclaimer
Previous Versions
Blog
Contribute
Privacy
Consumer Health Privacy
Terms of Use
Trademarks
© Microsoft 2026
