swagger: '2.0'
info:
version: 2020-08-01-preview
title: Microsoft Azure AccessControlClient AccessConnector ManagementGroups API
description: "A Management Group is a customer defined scope (grouping mechanism) that \nprovides access control (authorization), policy management and reporting. \nManagement Groups are organized in a strictly tree-based hierarchy.\n"
schemes:
- https
tags:
- name: ManagementGroups
description: "A Management Group is a customer defined scope (grouping mechanism) that \nprovides access control (authorization), policy management and reporting. \nManagement Groups are organized in a strictly tree-based hierarchy.\n"
paths:
/providers/Microsoft.Management/managementGroups:
get:
tags:
- ManagementGroups
operationId: microsoftAzureManagementgroupsList
description: List management groups for the authenticated user.
parameters:
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/CacheControlHeader'
- $ref: '#/parameters/SkipTokenParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ManagementGroupListResult'
default:
description: Error
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-pageable:
nextLinkName: nextLink
x-ms-examples:
ListManagementGroups:
$ref: ./examples/ListManagementGroups.json
summary: Microsoft Azure Get Providers Microsoft Management Managementgroups
/providers/Microsoft.Management/managementGroups/{groupId}:
get:
tags:
- ManagementGroups
operationId: microsoftAzureManagementgroupsGet
description: Get the details of the management group.
parameters:
- $ref: '#/parameters/GroupIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/ExpandParameter'
- $ref: '#/parameters/RecurseParameter'
- $ref: '#/parameters/FilterParameter'
- $ref: '#/parameters/CacheControlHeader'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ManagementGroup'
default:
description: Error
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
GetManagementGroup:
$ref: ./examples/GetManagementGroup.json
GetManagementGroupWithExpand:
$ref: ./examples/GetManagementGroupWithExpand.json
GetManagementGroupsWithExpandAndRecurse:
$ref: ./examples/GetManagementGroupWithExpandAndRecurse.json
summary: Microsoft Azure Get Providers Microsoft Management Managementgroups Groupid
put:
tags:
- ManagementGroups
operationId: microsoftAzureManagementgroupsCreateorupdate
description: Create or update a management group.
If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated.
parameters:
- $ref: '#/parameters/GroupIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/CacheControlHeader'
- $ref: '#/parameters/CreateManagementGroupRequestParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ManagementGroup'
'202':
description: Accepted
schema:
$ref: '#/definitions/OperationResults'
default:
description: Error
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
PutManagementGroup:
$ref: ./examples/PutManagementGroup.json
x-ms-long-running-operation: true
summary: Microsoft Azure Put Providers Microsoft Management Managementgroups Groupid
patch:
tags:
- ManagementGroups
operationId: microsoftAzureManagementgroupsUpdate
description: Update a management group.
parameters:
- $ref: '#/parameters/GroupIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/CacheControlHeader'
- $ref: '#/parameters/PatchGroupRequestParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ManagementGroup'
default:
description: Error
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
PatchManagementGroup:
$ref: ./examples/PatchManagementGroup.json
summary: Microsoft Azure Patch Providers Microsoft Management Managementgroups Groupid
delete:
tags:
- ManagementGroups
operationId: microsoftAzureManagementgroupsDelete
description: Delete management group.
If a management group contains child resources, the request will fail.
parameters:
- $ref: '#/parameters/GroupIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/CacheControlHeader'
responses:
'202':
description: Accepted
schema:
$ref: '#/definitions/OperationResults'
'204':
description: NoContent
default:
description: Error
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
DeleteManagementGroup:
$ref: ./examples/DeleteManagementGroup.json
x-ms-long-running-operation: true
summary: Microsoft Azure Delete Providers Microsoft Management Managementgroups Groupid
/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}:
put:
tags:
- ManagementGroups
operationId: microsoftAzureManagementgroupsubscriptionsCreate
description: Associates existing subscription with the management group.
parameters:
- $ref: '#/parameters/GroupIdParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/CacheControlHeader'
responses:
'204':
description: NoContent
default:
description: Error
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
AddSubscriptionToManagementGroup:
$ref: ./examples/AddManagementGroupSubscription.json
summary: Microsoft Azure Put Providers Microsoft Management Managementgroups Groupid Subscriptions Subscriptionid
delete:
tags:
- ManagementGroups
operationId: microsoftAzureManagementgroupsubscriptionsDelete
description: De-associates subscription from the management group.
parameters:
- $ref: '#/parameters/GroupIdParameter'
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/CacheControlHeader'
responses:
'204':
description: NoContent
default:
description: Error
schema:
$ref: '#/definitions/ErrorResponse'
x-ms-examples:
DeleteSubscriptionFromManagementGroup:
$ref: ./examples/RemoveManagementGroupSubscription.json
summary: Microsoft Azure Delete Providers Microsoft Management Managementgroups Groupid Subscriptions Subscriptionid
definitions:
ManagementGroup:
description: The management group details.
x-ms-azure-resource: true
properties:
id:
type: string
description: The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
readOnly: true
type:
type: string
description: The type of the resource. For example, /providers/Microsoft.Management/managementGroups
readOnly: true
name:
type: string
description: The name of the management group. For example, 00000000-0000-0000-0000-000000000000
readOnly: true
properties:
title: Properties
x-ms-client-flatten: true
$ref: '#/definitions/ManagementGroupProperties'
PatchManagementGroupRequest:
description: Management group patch parameters.
type: object
properties:
displayName:
type: string
description: The friendly name of the management group.
x-nullable: true
parentId:
type: string
description: (Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
x-nullable: true
ErrorDetails:
description: The details of the error.
properties:
code:
description: One of a server-defined set of error codes.
type: string
message:
description: A human-readable representation of the error.
type: string
details:
description: A human-readable representation of the error's details.
type: string
OperationResults:
description: The results of an asynchronous operation.
properties:
id:
type: string
description: The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
readOnly: true
type:
type: string
description: The type of the resource. For example, /providers/Microsoft.Management/managementGroups
readOnly: true
name:
type: string
description: The name of the management group. For example, 00000000-0000-0000-0000-000000000000
readOnly: true
properties:
title: Properties
x-ms-client-flatten: true
type: object
properties:
provisioningState:
title: Provisioning State
$ref: '#/definitions/ProvisioningState'
ManagementGroupDetails:
description: The details of a management group.
type: object
properties:
version:
type: number
format: int32
description: The version number of the object.
updatedTime:
type: string
format: date-time
description: The date and time when this object was last updated.
updatedBy:
type: string
description: The identity of the principal or process that updated the object.
parent:
title: Parent
$ref: '#/definitions/ParentGroupInfo'
CreateManagementGroupRequest:
description: Management group creation parameters.
type: object
x-ms-azure-resource: true
properties:
id:
type: string
description: The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
readOnly: true
type:
type: string
description: The type of the resource. For example, /providers/Microsoft.Management/managementGroups
readOnly: true
name:
type: string
description: The name of the management group. For example, 00000000-0000-0000-0000-000000000000
properties:
title: Properties
x-ms-client-flatten: true
$ref: '#/definitions/CreateManagementGroupProperties'
CreateManagementGroupProperties:
description: The generic properties of a management group used during creation.
type: object
properties:
tenantId:
type: string
readOnly: true
description: The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
displayName:
type: string
description: The friendly name of the management group. If no value is passed then this field will be set to the groupId.
x-nullable: true
roles:
description: The roles definitions associated with the management group.
readOnly: true
type: array
x-nullable: true
items:
type: string
details:
title: Details
$ref: '#/definitions/CreateManagementGroupDetails'
children:
description: The list of children.
readOnly: true
x-nullable: true
type: array
items:
$ref: '#/definitions/CreateManagementGroupChildInfo'
ManagementGroupChildInfo:
description: The child information of a management group.
properties:
type:
title: The type of child resource.
$ref: '#/definitions/ManagementGroupChildType'
description: The fully qualified resource type which includes provider namespace (e.g. /providers/Microsoft.Management/managementGroups)
id:
type: string
description: The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
name:
type: string
description: The name of the child entity.
displayName:
type: string
description: The friendly name of the child resource.
roles:
description: The roles definitions associated with the management group.
type: array
items:
type: string
children:
description: The list of children.
type: array
items:
$ref: '#/definitions/ManagementGroupChildInfo'
ManagementGroupInfoProperties:
description: The generic properties of a management group.
type: object
properties:
tenantId:
type: string
description: The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
displayName:
type: string
description: The friendly name of the management group.
ManagementGroupListResult:
description: Describes the result of the request to list management groups.
properties:
value:
description: The list of management groups.
type: array
items:
$ref: '#/definitions/ManagementGroupInfo'
nextLink:
description: The URL to use for getting the next set of results.
type: string
readOnly: true
ManagementGroupInfo:
description: The management group resource.
properties:
id:
type: string
description: The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
readOnly: true
type:
type: string
description: The type of the resource. For example, /providers/Microsoft.Management/managementGroups
readOnly: true
name:
type: string
description: The name of the management group. For example, 00000000-0000-0000-0000-000000000000
readOnly: true
properties:
x-ms-client-flatten: true
title: Properties
$ref: '#/definitions/ManagementGroupInfoProperties'
ManagementGroupChildType:
type: string
enum:
- /providers/Microsoft.Management/managementGroups
- /subscriptions
description: The type of child resource.
CreateParentGroupInfo:
description: (Optional) The ID of the parent management group used during creation.
properties:
id:
type: string
description: The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
name:
type: string
readOnly: true
description: The name of the parent management group
displayName:
type: string
readOnly: true
description: The friendly name of the parent management group.
ErrorResponse:
description: The error object.
properties:
error:
title: Error
$ref: '#/definitions/ErrorDetails'
ManagementGroupProperties:
description: The generic properties of a management group.
type: object
properties:
tenantId:
type: string
description: The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000
displayName:
type: string
description: The friendly name of the management group.
roles:
description: The role definitions associated with the management group.
type: array
x-nullable: true
items:
type: string
details:
title: Details
$ref: '#/definitions/ManagementGroupDetails'
children:
description: The list of children.
x-nullable: true
type: array
items:
$ref: '#/definitions/ManagementGroupChildInfo'
ParentGroupInfo:
description: (Optional) The ID of the parent management group.
properties:
id:
type: string
description: The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
name:
type: string
description: The name of the parent management group
displayName:
type: string
description: The friendly name of the parent management group.
CreateManagementGroupChildInfo:
description: The child information of a management group used during creation.
properties:
type:
title: The type of child resource.
readOnly: true
$ref: '#/definitions/ManagementGroupChildType'
description: The fully qualified resource type which includes provider namespace (e.g. /providers/Microsoft.Management/managementGroups)
id:
type: string
readOnly: true
description: The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
name:
type: string
readOnly: true
description: The name of the child entity.
displayName:
type: string
readOnly: true
description: The friendly name of the child resource.
roles:
description: The roles definitions associated with the management group.
readOnly: true
type: array
items:
type: string
children:
description: The list of children.
readOnly: true
type: array
items:
$ref: '#/definitions/CreateManagementGroupChildInfo'
ProvisioningState:
title: Provisioning State
type: string
enum:
- Updating
description: The provisioning status.
CreateManagementGroupDetails:
description: The details of a management group used during creation.
type: object
properties:
version:
type: number
readOnly: true
format: int32
description: The version number of the object.
updatedTime:
type: string
readOnly: true
format: date-time
description: The date and time when this object was last updated.
updatedBy:
type: string
readOnly: true
description: The identity of the principal or process that updated the object.
parent:
title: Parent
$ref: '#/definitions/CreateParentGroupInfo'
parameters:
SkipTokenParameter:
name: $skiptoken
in: query
required: false
type: string
description: "Page continuation token is only used if a previous operation returned a partial result. \nIf a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls.\n"
x-ms-parameter-location: client
ApiVersionParameter:
name: api-version
in: query
required: true
type: string
description: Version of the API to be used with the client request. The current version is 2018-01-01-preview.
FilterParameter:
name: $filter
in: query
required: false
description: A filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType ne Subscription')
type: string
x-ms-parameter-location: method
SubscriptionIdParameter:
name: subscriptionId
in: path
required: true
type: string
description: Subscription ID.
x-ms-parameter-location: method
ExpandParameter:
name: $expand
in: query
required: false
type: string
enum:
- children
x-ms-parameter-location: method
description: The $expand=children query string parameter allows clients to request inclusion of children in the response payload.
PatchGroupRequestParameter:
name: patchGroupRequest
in: body
required: true
description: Management group patch parameters.
schema:
$ref: '#/definitions/PatchManagementGroupRequest'
x-ms-parameter-location: client
CreateManagementGroupRequestParameter:
name: createManagementGroupRequest
in: body
required: true
description: Management group creation parameters.
schema:
$ref: '#/definitions/CreateManagementGroupRequest'
x-ms-parameter-location: client
RecurseParameter:
name: $recurse
in: query
required: false
type: boolean
x-ms-parameter-location: method
description: The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload. Note that $expand=children must be passed up if $recurse is set to true.
GroupIdParameter:
name: groupId
in: path
required: true
type: string
description: Management Group ID.
x-ms-parameter-location: method
CacheControlHeader:
name: Cache-Control
in: header
default: no-cache
description: Indicates that the request shouldn't utilize any caches.
type: string
x-ms-parameter-location: method
x-ms-parameterized-host:
hostTemplate: '{endpoint}'
useSchemePrefix: false
parameters:
- $ref: '#/parameters/Endpoint'