Skip to content

Commit 562d0f9

Browse files
committed
Merge branch 'release-build-azure-service-groups' of https://github.com/rthorn17/azure-docs-pr into build-prep-service-groups
2 parents 3ab1e40 + de98915 commit 562d0f9

File tree

9 files changed

+668
-0
lines changed

9 files changed

+668
-0
lines changed

articles/governance/index.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ productDirectory:
4040
text: Protect your resource hierarchy
4141
- url: ./management-groups/index.yml
4242
text: See more >
43+
- title: Azure Service Groups
44+
imageSrc: ./media/management-groups.svg
45+
links:
46+
- url: ./service-groups/overview.md
47+
text: Developer overview
48+
- url: ./service-groups/create-service-group-rest-api.md
49+
text: Create a service group using the REST API
50+
- url: ./service-groups/create-service-group-member-rest-api.md
51+
text: Connect resources or resource containers to service groups
52+
- url: ./service-groups/manage-service-groups.md
53+
text: Manage Service Groups
4354
- title: Azure Policy
4455
imageSrc: ./media/azure-policy.svg
4556
links:
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: "Quickstart: Connect Service Group members using the REST API"
3+
description: In this quickstart, you use REST API to connect a resource to a service group with a service group member relationship.
4+
author: rthorn17
5+
ms.author: rithorn
6+
ms.service: azure-policy
7+
ms.topic: quickstart
8+
ms.date: 5/19/2025
9+
---
10+
11+
12+
# Quickstart: Connect resources or resource containers to service groups with Service Group Member Relationships
13+
14+
To connect resources, resource groups, or subscriptions to a Service Group (preview), you need to create a new Service Group Member Relationship. For more information on service groups, see [Getting started with Service Groups](overview.md).
15+
16+
> [!IMPORTANT]
17+
> Azure Service Groups is currently in PREVIEW. For more information about participating in the preview, see [TBD Link]().
18+
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
19+
20+
## Prerequisites
21+
22+
- If you don't have an Azure subscription, create a [free](https://azure.microsoft.com/free/)
23+
account before you begin.
24+
25+
- If you haven't already, install [ARMClient](https://github.com/projectkudu/ARMClient). It's a tool
26+
that sends HTTP requests to Azure Resource Manager-based REST APIs.
27+
28+
## Create in REST API
29+
30+
For REST API, use the
31+
[Service Groups Member- Create or Update]() endpoint to create a new service group member.
32+
33+
In this example, we're connecting a Virtual Machine [VM1] to a Service Group [Contoso].
34+
35+
1. Service Group: **groupId** is _Contoso_
36+
1. Virtual Machine: The **resourceID** is _VM1_
37+
1. Service Group Member: The **relationshipID** is _SGM1_
38+
39+
When you're adding a resource to a Service Group, you create service group member by extending the resource.
40+
41+
- REST API URI
42+
43+
```http
44+
PUT https://management.azure.com/[scope]/providers/Microsoft.Relationships/serviceGroupMember/SGM1?api-version=2023-09-01-preview
45+
```
46+
47+
48+
In the preceding example, the new service group member is created extending the Virtual Machine. To
49+
specify the service group as the parent, use the **TargetID** property.
50+
51+
- REST API URI
52+
53+
```http
54+
PUT https://management.azure.com/subscriptions/[SUBID]/resourceGroups/[RGID]/providers/microsoft.compute/virtualmachine/[VMID]/providers/Microsoft.Management/serviceGroups/SGM1?api-version=2024-02-01-preview
55+
```
56+
57+
- Request Body
58+
59+
```json
60+
{
61+
"properties": {
62+
"targetId": "providers/microsoft.management/servicegroups/Contoso"
63+
}
64+
}
65+
```
66+
67+
## Clean up resources
68+
69+
To remove the service group created in this document, use the
70+
[Service Group Member Delete]() endpoint:
71+
72+
- REST API URI
73+
74+
```http
75+
DELETE https://management.azure.com/[scope]/providers/Microsoft.Relationships/serviceGroupMember/SGM1?api-version=2023-09-01-preview
76+
```
77+
78+
- No Request Body
79+
80+
81+
## Next step
82+
83+
In this quickstart, you created a service group to help create different views in Azure. The
84+
service group can have member subscriptions, resource groups, resources, or other service groups.
85+
86+
To learn more about service groups and how to manage your service group hierarchy, continue to:
87+
88+
> [!div class="nextstepaction"]
89+
> [Manage your resources with service groups](manage-service-groups.md)
90+
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: "Quickstart: Create a service group with REST API"
3+
description: In this quickstart, you use REST API to create a service group to organize your resources.
4+
author: rthorn17
5+
ms.author: rithorn
6+
ms.service: azure-policy
7+
ms.topic: quickstart
8+
ms.date: 5/19/2025
9+
---
10+
11+
12+
# Quickstart: Create a service group (preview) with REST API
13+
14+
With Azure Service Groups (preview) you can create low-privilege-based groupings of resources across subscriptions. They provide a way to manage resources with minimal permissions, ensuring that resources can be grouped and managed without granting excessive access. Service Groups are designed to complement existing organizational structures like Resource Groups, Subscriptions, and Management Groups by offering a flexible and secure way to aggregate resources for specific purposes. For more information on service groups, see [Getting started with Service Groups](overview.md).
15+
16+
> [!IMPORTANT]
17+
> Azure Service Groups is currently in PREVIEW. For more information about participating in the preview, see [TBD Link]().
18+
> See the [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/) for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
19+
20+
## Prerequisites
21+
22+
- If you don't have an Azure subscription, create a [free](https://azure.microsoft.com/free/)
23+
account before you begin.
24+
25+
- If you haven't already, install [ARMClient](https://github.com/projectkudu/ARMClient). It's a tool
26+
that sends HTTP requests to Azure Resource Manager-based REST APIs.
27+
28+
## Create in REST API
29+
30+
For REST API, use the
31+
[Service Groups - Create or Update]()
32+
endpoint to create a new service group. In this example, the service group **groupId** is
33+
_Contoso_.
34+
35+
- REST API URI
36+
37+
```http
38+
PUT https://management.azure.com/providers/Microsoft.Management/serviceGroups/Contoso?api-version=2024-02-01-preview
39+
```
40+
41+
- Request Body
42+
43+
The **groupId** is a unique identifier being created. This ID is used by other commands to reference
44+
this group and it can't be changed later.
45+
46+
If you want the service group to show a different name within the Azure portal, add the
47+
**properties.displayName** property in the request body. For example, to create a service group
48+
with the **groupId** of _Contoso_ and the display name of _Contoso Group_, use the following
49+
endpoint and request body:
50+
51+
```json
52+
{
53+
"properties": {
54+
"displayName": "_Contoso Group_",
55+
"parent": {
56+
"resourceId": "/providers/Microsoft.Management/serviceGroups/[tenantId]"
57+
}
58+
}
59+
}
60+
```
61+
62+
63+
In the preceding examples, the new service group is created under the root service group. To
64+
specify a different service group as the parent, use the **properties.parent.id** property.
65+
66+
- REST API URI
67+
68+
```http
69+
PUT https://management.azure.com/providers/Microsoft.Management/serviceGroups/Contoso?api-version=2024-02-01-preview
70+
```
71+
72+
- Request Body
73+
74+
```json
75+
{
76+
"properties": {
77+
"displayName": "Contoso Group",
78+
"parent": {
79+
"id": "/providers/Microsoft.Management/serviceGroups/HoldingGroup"
80+
}
81+
}
82+
}
83+
```
84+
85+
## Verify your Service Group was created
86+
Service Groups PUT or create call is an Asynchronous call which means that the response to the initial create call is an HTTP status code 201: Accepted. This response doesn't mean the Service group was successfully created, only that the Azure successfully received the request to create the Service Group.
87+
88+
To check the operation was successful, you should do a GET call on the value returned in the **azure-asyncoperation** header. The URL provides the status of the created operation.
89+
90+
> ![NOTE]
91+
> To avoid issues within scripts or templates, the automation should poll this provided URL before moving to the next step. If the automation moves to the next step before the operation has responded successful, the next operation will fail as the Service Group has not been created.
92+
93+
## Clean up resources
94+
95+
To remove the service group created in this document, use the
96+
[Management Groups - Delete]() endpoint:
97+
98+
- REST API URI
99+
100+
```http
101+
DELETE https://management.azure.com/providers/Microsoft.Management/serviceGroups/Contoso?api-version=2024-02-01-preview
102+
```
103+
104+
- No Request Body
105+
106+
## Related content
107+
* [What are Azure Service Groups?](overview.md)
108+
* [How to: Manage Service Groups](manaage-service-groups.md)
109+
* [Connect service group members with REST API](create-service-group-member-rest-api.md)

0 commit comments

Comments
 (0)