diff --git a/specification/managementgroups/ManagementGroups.Management/HierarchySettings.tsp b/specification/managementgroups/ManagementGroups.Management/HierarchySettings.tsp new file mode 100644 index 000000000000..ae38a7b69b37 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/HierarchySettings.tsp @@ -0,0 +1,89 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ManagementGroup.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Microsoft.Management; +/** + * Settings defined at the Management Group scope. + */ +@singleton("default") +@parentResource(ManagementGroup) +model HierarchySettings + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = HierarchySettings, + KeyName = "setting", + SegmentName = "settings", + NamePattern = "" + >; +} + +@armResourceOperations +interface HierarchySettingsOperationGroup { + /** + * Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + @operationId("HierarchySettings_Get") + get is Extension.Read; + + /** + * Creates or updates the hierarchy settings defined at the Management Group level. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility" + @operationId("HierarchySettings_CreateOrUpdate") + createOrUpdate is Azure.ResourceManager.Legacy.Extension.CreateOrReplaceSync< + Extension.Tenant, + HierarchySettings, + Request = CreateOrUpdateSettingsRequest, + Response = ArmResourceUpdatedResponse + >; + + /** + * Updates the hierarchy settings defined at the Management Group level. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + @operationId("HierarchySettings_Update") + @patch(#{ implicitOptionality: false }) + update is Extension.CustomPatchSync< + Extension.Tenant, + HierarchySettings, + PatchModel = CreateOrUpdateSettingsRequest + >; + + /** + * Deletes the hierarchy settings defined at the Management Group level. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + @operationId("HierarchySettings_Delete") + delete is Extension.DeleteSync< + Extension.Tenant, + HierarchySettings, + Response = ArmDeletedResponse + >; +} + +@@doc(HierarchySettings.name, ""); +@@doc(HierarchySettings.properties, + "The generic properties of hierarchy settings." +); +@@doc(HierarchySettingsOperationGroup.createOrUpdate::parameters.resource, + "Tenant level settings request parameter." +); +@@doc(HierarchySettingsOperationGroup.update::parameters.properties, + "Tenant level settings request parameter." +); diff --git a/specification/managementgroups/ManagementGroups.Management/ManagementGroup.tsp b/specification/managementgroups/ManagementGroups.Management/ManagementGroup.tsp new file mode 100644 index 000000000000..7f2ded8f4dce --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/ManagementGroup.tsp @@ -0,0 +1,192 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Microsoft.Management; +/** + * The management group details. + */ +model ManagementGroup + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = ManagementGroup, + KeyName = "groupId", + SegmentName = "managementGroups", + NamePattern = "" + >; +} + +@armResourceOperations +interface ManagementGroups { + /** + * Get the details of the management group. + * + */ + get is Extension.Read< + Extension.Tenant, + ManagementGroup, + Parameters = { + /** + * The $expand=children query string parameter allows clients to request inclusion of children in the response payload. $expand=path includes the path from the root group to the current group. $expand=ancestors includes the ancestor Ids of the current group. + */ + @query("$expand") + $expand?: ManagementGroupExpandType; + + /** + * 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. + */ + @query("$recurse") + $recurse?: boolean; + + /** + * A filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType ne Subscription') + */ + @query("$filter") + $filter?: string; + + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + } + >; + + /** + * 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. + * + */ + #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-core/response-schema-problem" "For backward compatibility" + @Azure.Core.useFinalStateVia("azure-async-operation") + createOrUpdate is Azure.ResourceManager.Legacy.Extension.CreateOrReplaceAsync< + Extension.Tenant, + ManagementGroup, + Request = CreateManagementGroupRequest, + Parameters = { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + }, + Response = ArmResourceUpdatedResponse | (ArmAcceptedLroResponse & { + @bodyRoot + _: AzureAsyncOperationResults; + }) + >; + + /** + * Update a management group. + * + */ + #suppress "@azure-tools/typespec-azure-core/response-schema-problem" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-patch" "For backward compatibility" + @patch(#{ implicitOptionality: false }) + update is Extension.CustomPatchSync< + Extension.Tenant, + ManagementGroup, + PatchModel = PatchManagementGroupRequest, + Parameters = { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + } + >; + + /** + * Delete management group. + * If a management group contains child resources, the request will fail. + * + */ + #suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/no-response-body" "For backward compatibility" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes" "For backward compatibility" + @Azure.Core.useFinalStateVia("azure-async-operation") + delete is Extension.DeleteWithoutOkAsync< + Extension.Tenant, + ManagementGroup, + Parameters = { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + }, + Response = (ArmDeleteAcceptedLroResponse & { + @bodyRoot + _: AzureAsyncOperationResults; + }) | ArmDeletedNoContentResponse + >; + + /** + * List all entities that descend from a management group. + * + */ + @list + @get + @action("descendants") + getDescendants is Extension.ActionSync< + Extension.Tenant, + ManagementGroup, + void, + ArmResponse, + Parameters = { + /** + * Page continuation token is only used if a previous operation returned a partial result. + * If 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. + * + */ + @query("$skiptoken") + $skiptoken?: string; + + /** + * Number of elements to return when retrieving results. Passing this in will override $skipToken. + */ + @query("$top") + $top?: int32; + } + >; + + /** + * Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + @list + @get + @action("settings") + list is Extension.ActionSync< + Extension.Tenant, + ManagementGroup, + void, + ArmResponse + >; +} + +@@doc(ManagementGroup.name, "Management Group ID."); +@@doc(ManagementGroup.properties, + "The generic properties of a management group." +); +@@doc(ManagementGroups.createOrUpdate::parameters.resource, + "Management group creation parameters." +); +@@doc(ManagementGroups.update::parameters.properties, + "Management group patch parameters." +); diff --git a/specification/managementgroups/ManagementGroups.Management/SubscriptionUnderManagementGroup.tsp b/specification/managementgroups/ManagementGroups.Management/SubscriptionUnderManagementGroup.tsp new file mode 100644 index 000000000000..9cd4826eb998 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/SubscriptionUnderManagementGroup.tsp @@ -0,0 +1,115 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ManagementGroup.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Microsoft.Management; +/** + * The details of subscription under management group. + */ +@parentResource(ManagementGroup) +model SubscriptionUnderManagementGroup + is Azure.ResourceManager.ProxyResource { + ...ResourceNameParameter< + Resource = SubscriptionUnderManagementGroup, + KeyName = "subscriptionId", + SegmentName = "subscriptions", + NamePattern = "" + >; +} + +@armResourceOperations +interface SubscriptionUnderManagementGroups { + /** + * Retrieves details about given subscription which is associated with the management group. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + @operationId("ManagementGroupSubscriptions_GetSubscription") + getSubscription is Extension.Read< + Extension.Tenant, + SubscriptionUnderManagementGroup, + Parameters = { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + } + >; + + /** + * Associates existing subscription with the management group. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "For backward compatibility" + @operationId("ManagementGroupSubscriptions_Create") + create is Azure.ResourceManager.Legacy.Extension.CreateOrReplaceSync< + Extension.Tenant, + SubscriptionUnderManagementGroup, + Request = void, + Parameters = { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + }, + Response = ArmResourceUpdatedResponse + >; + + /** + * De-associates subscription from the management group. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + @operationId("ManagementGroupSubscriptions_Delete") + delete is Extension.DeleteSync< + Extension.Tenant, + SubscriptionUnderManagementGroup, + Parameters = { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + } + >; + + /** + * Retrieves details about all subscriptions which are associated with the management group. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + @operationId("ManagementGroupSubscriptions_GetSubscriptionsUnderManagementGroup") + getSubscriptionsUnderManagementGroup is Extension.ListByTarget< + Extension.Tenant, + SubscriptionUnderManagementGroup, + Parameters = { + /** + * Page continuation token is only used if a previous operation returned a partial result. + * If 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. + * + */ + @query("$skiptoken") + $skiptoken?: string; + }, + Response = ArmResponse + >; +} + +@@doc(SubscriptionUnderManagementGroup.name, "Subscription ID."); +@@doc(SubscriptionUnderManagementGroup.properties, + "The generic properties of subscription under a management group." +); diff --git a/specification/managementgroups/ManagementGroups.Management/back-compatible.tsp b/specification/managementgroups/ManagementGroups.Management/back-compatible.tsp new file mode 100644 index 000000000000..aea3c2958463 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/back-compatible.tsp @@ -0,0 +1,83 @@ +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Microsoft.Management; + +@@clientName(ManagementGroupListResult.`@nextLink`, "NextLink"); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(ManagementGroupInfo.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(CreateManagementGroupRequest.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(AzureAsyncOperationResults.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(DescendantInfo.properties); + +@@clientName(HierarchySettingsList.`@nextLink`, "NextLink"); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(HierarchySettingsInfo.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(CreateOrUpdateSettingsRequest.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(EntityInfo.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(OperationResults.properties); + +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(EntityHierarchyItem.properties); + +@@clientName(ManagementGroups.createOrUpdate::parameters.resource, + "createManagementGroupRequest" +); +@@clientName(ManagementGroups.update::parameters.properties, + "patchGroupRequest" +); +@@clientLocation(ManagementGroups.list, "HierarchySettings"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(ManagementGroup.properties); + +@@clientLocation(SubscriptionUnderManagementGroups.getSubscription, + "ManagementGroupSubscriptions" +); +@@clientLocation(SubscriptionUnderManagementGroups.create, + "ManagementGroupSubscriptions" +); +@@clientLocation(SubscriptionUnderManagementGroups.delete, + "ManagementGroupSubscriptions" +); +@@clientLocation(SubscriptionUnderManagementGroups.getSubscriptionsUnderManagementGroup, + "ManagementGroupSubscriptions" +); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(SubscriptionUnderManagementGroup.properties); + +@@clientLocation(HierarchySettingsOperationGroup.get, "HierarchySettings"); +@@clientLocation(HierarchySettingsOperationGroup.createOrUpdate, + "HierarchySettings" +); +@@clientName(HierarchySettingsOperationGroup.createOrUpdate::parameters.resource, + "CreateTenantSettingsRequest" +); +@@clientLocation(HierarchySettingsOperationGroup.update, "HierarchySettings"); +@@clientName(HierarchySettingsOperationGroup.update::parameters.properties, + "CreateTenantSettingsRequest" +); +@@clientLocation(HierarchySettingsOperationGroup.delete, "HierarchySettings"); +#suppress "@azure-tools/typespec-azure-core/no-legacy-usage" "Property flatten for SDK backward compatibility." +@@Legacy.flattenProperty(HierarchySettings.properties); + +@@clientLocation(ManagementGroupsOperationGroup.list, ManagementGroups); + +@@clientLocation(EntitiesOperationGroup.list, "Entities"); + +@@clientName(checkNameAvailability::parameters.body, + "checkNameAvailabilityRequest" +); diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/AddManagementGroupSubscription.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/AddManagementGroupSubscription.json new file mode 100644 index 000000000000..1f4f2d1ee4a0 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/AddManagementGroupSubscription.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "Group", + "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc" + }, + "responses": { + "200": { + "body": { + "name": "728bcbe4-8d56-4510-86c2-4921b8beefbc", + "type": "Microsoft.Management/managementGroups/subscriptions", + "id": " /providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", + "properties": { + "displayName": "Group", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/Group" + }, + "state": "Active", + "tenant": "e751ac82-623b-4913-8d74-22637c832373" + } + } + } + }, + "operationId": "ManagementGroupSubscriptions_Create", + "title": "AddSubscriptionToManagementGroup" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/CheckManagementGroupNameAvailability.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/CheckManagementGroupNameAvailability.json new file mode 100644 index 000000000000..d65833862c58 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/CheckManagementGroupNameAvailability.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "checkNameAvailabilityRequest": { + "name": "nameTocheck", + "type": "Microsoft.Management/managementGroups" + } + }, + "responses": { + "200": { + "body": { + "message": "Error message", + "nameAvailable": false, + "reason": "AlreadyExists" + } + } + }, + "operationId": "CheckNameAvailability", + "title": "CheckManagementGroupNameAvailability" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/DeleteHierarchySettings.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/DeleteHierarchySettings.json new file mode 100644 index 000000000000..7c42ed3c4994 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/DeleteHierarchySettings.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2023-04-01", + "groupId": "root" + }, + "responses": { + "200": {} + }, + "operationId": "HierarchySettings_Delete", + "title": "GetGroupSettings" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/DeleteManagementGroup.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/DeleteManagementGroup.json new file mode 100644 index 000000000000..9874629ed1c9 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/DeleteManagementGroup.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "GroupToDelete" + }, + "responses": { + "202": { + "body": { + "name": "GroupToDelete", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/GroupToDelete", + "status": "NotStarted" + }, + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Management/managementGroups/GroupToDelete?api-version=2023-04-01" + } + }, + "204": {} + }, + "operationId": "ManagementGroups_Delete", + "title": "DeleteManagementGroup" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetAllSubscriptionsFromManagementGroup.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetAllSubscriptionsFromManagementGroup.json new file mode 100644 index 000000000000..33960ed68396 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetAllSubscriptionsFromManagementGroup.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-04-01", + "groupId": "Group" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "728bcbe4-8d56-4510-86c2-4921b8beefbc", + "type": "Microsoft.Management/managementGroups/subscriptions", + "id": "/providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", + "properties": { + "displayName": "S5", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/Group" + }, + "state": "Active", + "tenant": "e751ac82-623b-4913-8d74-22637c832373" + } + } + ] + } + } + }, + "operationId": "ManagementGroupSubscriptions_GetSubscriptionsUnderManagementGroup", + "title": "GetAllSubscriptionsFromManagementGroup" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetDescendants.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetDescendants.json new file mode 100644 index 000000000000..064954aee38f --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetDescendants.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-04-01", + "groupId": "20000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", + "properties": { + "displayName": "Group 1", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" + } + } + }, + { + "name": "20000000-0004-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups/subscriptions", + "id": "/subscriptions/20000000-0004-0000-0000-000000000000", + "properties": { + "displayName": "Subscription 4", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" + } + } + } + ] + } + } + }, + "operationId": "ManagementGroups_GetDescendants", + "title": "GetDescendants" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetEntities.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetEntities.json new file mode 100644 index 000000000000..7f8add94bd43 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetEntities.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-01" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", + "properties": { + "displayName": "Group 1 Tenant 2", + "inheritedPermissions": "view", + "numberOfChildGroups": 1, + "numberOfChildren": 2, + "numberOfDescendants": 3, + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" + }, + "parentDisplayNameChain": [ + "Tenant Root Group", + "Group 1 Tenant 2 Parent" + ], + "parentNameChain": [ + "TenantRootGroup", + "Group1Tenant2Parent" + ], + "permissions": "view", + "tenantId": "20000000-0000-0000-0000-000000000000" + } + }, + { + "name": "20000000-0004-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0004-0000-0000-000000000000", + "properties": { + "displayName": "Group 4 Tenant 2", + "inheritedPermissions": "delete", + "numberOfChildGroups": 0, + "numberOfChildren": 0, + "numberOfDescendants": 0, + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" + }, + "parentDisplayNameChain": [ + "Tenant Root Group", + "Group 4 Tenant 2 Parent" + ], + "parentNameChain": [ + "TenantRootGroup", + "Group4 Tenant2Parent" + ], + "permissions": "delete", + "tenantId": "20000000-0000-0000-0000-000000000000" + } + } + ] + } + } + }, + "operationId": "Entities_List", + "title": "GetEntities" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetHierarchySettings.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetHierarchySettings.json new file mode 100644 index 000000000000..90f7479e9b29 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetHierarchySettings.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-04-01", + "groupId": "root" + }, + "responses": { + "200": { + "body": { + "name": "root", + "type": "Microsoft.Management/managementGroups/settings", + "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", + "properties": { + "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", + "requireAuthorizationForGroupCreation": true, + "tenantId": "20000000-0000-0000-0000-000000000000" + } + } + } + }, + "operationId": "HierarchySettings_Get", + "title": "GetGroupSettings" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroup.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroup.json new file mode 100644 index 000000000000..41e8f254fc25 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroup.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", + "properties": { + "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "parent": { + "name": "RootGroup", + "displayName": "RootGroup", + "id": "/providers/Microsoft.Management/managementGroups/RootGroup" + }, + "updatedBy": "16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 + } + } + } + } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroup" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithAncestors.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithAncestors.json new file mode 100644 index 000000000000..2906ff2c8877 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithAncestors.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "$expand": "ancestors", + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-00000000000" + }, + "responses": { + "200": { + "body": { + "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", + "properties": { + "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "managementGroupAncestorsChain": [ + { + "name": "20000000-0000-0000-0000-000000000001", + "displayName": "Parent display name" + }, + { + "name": "20000000-0000-0000-0000-000000000000", + "displayName": "Grandparent display name" + } + ], + "parent": { + "name": "20000000-0000-0000-0000-000000000001", + "displayName": "Parent display name", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000001" + }, + "updatedBy": "Test", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 + } + } + } + } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroupWithAncestors" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithExpand.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithExpand.json new file mode 100644 index 000000000000..83c613adce56 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithExpand.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "$expand": "children", + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", + "properties": { + "children": [ + { + "name": "20000000-0002-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "displayName": "Group 2 Tenant 2", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000" + }, + { + "name": "20000000-0003-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "displayName": "Group 3 Tenant 2", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0003-0000-0000-000000000000" + }, + { + "name": "10000000-F004-0000-0000-000000000000", + "type": "/subscriptions", + "displayName": "Subscription 4 Tenant 1", + "id": "/subscriptions/10000000-F004-0000-0000-000000000000" + }, + { + "name": "20000000-F005-0000-0000-000000000000", + "type": "/subscriptions", + "displayName": "Subscription 5 Tenant 2", + "id": "/subscriptions/20000000-F005-0000-0000-000000000000" + }, + { + "name": "30000000-F003-0000-0000-000000000000", + "type": "/subscriptions", + "displayName": "Subscription 3 Tenant 3", + "id": "/subscriptions/30000000-F003-0000-0000-000000000000" + } + ], + "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "parent": { + "name": "20000000-0000-0000-0000-000000000000", + "displayName": "20000000-0000-0000-0000-000000000000", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" + }, + "updatedBy": "Test", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 + } + } + } + } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroupWithExpand" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithExpandAndRecurse.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithExpandAndRecurse.json new file mode 100644 index 000000000000..fd875e466c67 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithExpandAndRecurse.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "$expand": "children", + "$recurse": true, + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "RootGroup", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/RootGroup", + "properties": { + "children": [ + { + "name": "Child", + "type": "Microsoft.Management/managementGroups", + "children": [ + { + "name": "Leaf", + "type": "Microsoft.Management/managementGroups", + "children": [ + { + "name": "728bcbe4-8d56-4510-86c2-4921b8beefbc", + "type": "/subscriptions", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc" + } + ], + "displayName": "Leaf", + "id": "/providers/Microsoft.Management/managementGroups/Leaf" + } + ], + "displayName": "Child", + "id": "/providers/Microsoft.Management/managementGroups/Child" + }, + { + "name": "AnotherChild", + "type": "Microsoft.Management/managementGroups", + "displayName": "Leaf", + "id": "/providers/Microsoft.Management/managementGroups/AnotherChild" + } + ], + "displayName": "RootGroup", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "parent": { + "name": "20000000-0000-0000-0000-000000000000", + "displayName": "20000000-0000-0000-0000-000000000000", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" + }, + "updatedBy": "bd490e30-04cb-433e-b8c8-6066959a8bab", + "updatedTime": "2018-01-25T02:26:49.0022093Z", + "version": 2 + } + } + } + } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroupsWithExpandAndRecurse" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithPath.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithPath.json new file mode 100644 index 000000000000..3261cf638522 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetManagementGroupWithPath.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "$expand": "path", + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", + "properties": { + "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "path": [ + { + "name": "20000000-0000-0000-0000-000000000000", + "displayName": "Grandparent display name" + }, + { + "name": "20000000-0000-0000-0000-000000000001", + "displayName": "Parent display name" + } + ], + "parent": { + "name": "20000000-0000-0000-0000-000000000001", + "displayName": "Parent display name", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000001" + }, + "updatedBy": "Test", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 + } + } + } + } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroupWithPath" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetSubscriptionFromManagementGroup.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetSubscriptionFromManagementGroup.json new file mode 100644 index 000000000000..0b73d128fa52 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/GetSubscriptionFromManagementGroup.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "Group", + "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc" + }, + "responses": { + "200": { + "body": { + "name": "728bcbe4-8d56-4510-86c2-4921b8beefbc", + "type": "Microsoft.Management/managementGroups/subscriptions", + "id": " /providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", + "properties": { + "displayName": "Group", + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/Group" + }, + "state": "Active", + "tenant": "e751ac82-623b-4913-8d74-22637c832373" + } + } + } + }, + "operationId": "ManagementGroupSubscriptions_GetSubscription", + "title": "GetSubscriptionFromManagementGroup" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListHierarchySettings.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListHierarchySettings.json new file mode 100644 index 000000000000..b10607aa599a --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListHierarchySettings.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-04-01", + "groupId": "root" + }, + "responses": { + "200": { + "body": { + "@nextLink": null, + "value": [ + { + "name": "root", + "type": "Microsoft.Management/managementGroups/settings", + "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", + "properties": { + "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", + "requireAuthorizationForGroupCreation": true, + "tenantId": "20000000-0000-0000-0000-000000000000" + } + } + ] + } + } + }, + "operationId": "HierarchySettings_List", + "title": "ListGroupSettings" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListManagementGroups.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListManagementGroups.json new file mode 100644 index 000000000000..8d5799580661 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListManagementGroups.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01" + }, + "responses": { + "200": { + "body": { + "@nextLink": null, + "value": [ + { + "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", + "properties": { + "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000" + } + }, + { + "name": "20000000-0004-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0004-0000-0000-000000000000", + "properties": { + "displayName": "Group 4 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000" + } + } + ] + } + } + }, + "operationId": "ManagementGroups_List", + "title": "ListManagementGroups" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListOperations.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListOperations.json new file mode 100644 index 000000000000..2903a79c9cba --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/ListOperations.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-04-01" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "display": { + "description": "aaaaaaaaaaaaaaaaaaaaaa", + "operation": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "provider": "aaaaaaaaaaaaaaaaaaaaa", + "resource": "aaaaaaaaaaaaa" + } + } + ] + } + } + }, + "operationId": "Operations_List", + "title": "List Operations" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PatchHierarchySettings.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PatchHierarchySettings.json new file mode 100644 index 000000000000..526fc6c08e3d --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PatchHierarchySettings.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "CreateTenantSettingsRequest": { + "properties": { + "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", + "requireAuthorizationForGroupCreation": true + } + }, + "api-version": "2023-04-01", + "groupId": "root" + }, + "responses": { + "200": { + "body": { + "name": "root", + "type": "Microsoft.Management/managementGroups/settings", + "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", + "properties": { + "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", + "requireAuthorizationForGroupCreation": true, + "tenantId": "20000000-0000-0000-0000-000000000000" + } + } + } + }, + "operationId": "HierarchySettings_Update", + "title": "GetGroupSettings" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PatchManagementGroup.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PatchManagementGroup.json new file mode 100644 index 000000000000..b64a17346dca --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PatchManagementGroup.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "ChildGroup", + "patchGroupRequest": { + "displayName": "AlternateDisplayName", + "parentGroupId": "/providers/Microsoft.Management/managementGroups/AlternateRootGroup" + } + }, + "responses": { + "200": { + "body": { + "name": "ChildGroup", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", + "properties": { + "displayName": "AlternateDisplayName", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "parent": { + "name": "AlternateRootGroup", + "displayName": "AlternateRootGroup", + "id": "/providers/Microsoft.Management/managementGroups/AlternateRootGroup" + }, + "updatedBy": "bd490e30-04cb-433e-b8c8-6066959a8bab", + "updatedTime": "2018-01-25T02:46:59.0545645Z", + "version": 2 + } + } + } + } + }, + "operationId": "ManagementGroups_Update", + "title": "PatchManagementGroup" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PutHierarchySettings.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PutHierarchySettings.json new file mode 100644 index 000000000000..c673e37e6405 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PutHierarchySettings.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "CreateTenantSettingsRequest": { + "properties": { + "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", + "requireAuthorizationForGroupCreation": true + } + }, + "api-version": "2023-04-01", + "groupId": "root" + }, + "responses": { + "200": { + "body": { + "name": "root", + "type": "Microsoft.Management/managementGroups/settings", + "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", + "properties": { + "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", + "requireAuthorizationForGroupCreation": true, + "tenantId": "20000000-0000-0000-0000-000000000000" + } + } + } + }, + "operationId": "HierarchySettings_CreateOrUpdate", + "title": "GetGroupSettings" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PutManagementGroup.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PutManagementGroup.json new file mode 100644 index 000000000000..25ad25dcf77c --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/PutManagementGroup.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "createManagementGroupRequest": { + "properties": { + "displayName": "ChildGroup", + "details": { + "parent": { + "id": "/providers/Microsoft.Management/managementGroups/RootGroup" + } + } + } + }, + "groupId": "ChildGroup" + }, + "responses": { + "200": { + "body": { + "name": "ChildGroup", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", + "properties": { + "displayName": "ChildGroup", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "parent": { + "name": "RootGroup", + "displayName": "RootGroup", + "id": "/providers/Microsoft.Management/managementGroups/RootGroup" + }, + "updatedBy": "16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 + } + } + } + }, + "202": { + "body": { + "name": "ChildGroup", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", + "status": "NotStarted" + } + } + }, + "operationId": "ManagementGroups_CreateOrUpdate", + "title": "PutManagementGroup" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/RemoveManagementGroupSubscription.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/RemoveManagementGroupSubscription.json new file mode 100644 index 000000000000..d2428f23aebf --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/RemoveManagementGroupSubscription.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "Group", + "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ManagementGroupSubscriptions_Delete", + "title": "DeleteSubscriptionFromManagementGroup" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/StartTenantBackfillRequest.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/StartTenantBackfillRequest.json new file mode 100644 index 000000000000..9792180a94e6 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/StartTenantBackfillRequest.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-04-01", + "startTenantBackfillRequest": {} + }, + "responses": { + "200": { + "body": { + "status": "Started", + "tenantId": "20000000-0000-0000-0000-000000000000" + } + } + }, + "operationId": "StartTenantBackfill", + "title": "StartTenantBackfill" +} diff --git a/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/TenantBackfillStatusRequest.json b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/TenantBackfillStatusRequest.json new file mode 100644 index 000000000000..8fa389627587 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/examples/2023-04-01/TenantBackfillStatusRequest.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-04-01", + "tenantBackfillStatusRequest": {} + }, + "responses": { + "200": { + "body": { + "status": "Started", + "tenantId": "20000000-0000-0000-0000-000000000000" + } + } + }, + "operationId": "TenantBackfillStatus", + "title": "TenantBackfillStatus" +} diff --git a/specification/managementgroups/ManagementGroups.Management/main.tsp b/specification/managementgroups/ManagementGroups.Management/main.tsp new file mode 100644 index 000000000000..067bed604f3c --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/main.tsp @@ -0,0 +1,50 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: true + * guessResourceKey: false + * Version: 0.11.12 + * Date: 2025-10-23T06:00:31.853Z + */ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./back-compatible.tsp"; +import "./ManagementGroup.tsp"; +import "./SubscriptionUnderManagementGroup.tsp"; +import "./HierarchySettings.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +/** + * The Azure Management Groups API enables consolidation of multiple + * subscriptions/resources into an organizational hierarchy and centrally + * manage access control, policies, alerting and reporting for those resources. + * + */ +@armProviderNamespace +@service(#{ title: "Management Groups API" }) +@versioned(Versions) +// FIXME: Common type version not set. Set to v3. +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) +namespace Microsoft.Management; + +/** + * The available API versions. + */ +enum Versions { + /** + * The 2023-04-01 API version. + */ + v2023_04_01: "2023-04-01", +} + +interface Operations extends Azure.ResourceManager.Operations {} diff --git a/specification/managementgroups/ManagementGroups.Management/models.tsp b/specification/managementgroups/ManagementGroups.Management/models.tsp new file mode 100644 index 000000000000..e2dd6ec2a3a8 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/models.tsp @@ -0,0 +1,1046 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Microsoft.Management; + +#suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" +union ManagementGroupExpandType { + string, + + /** + * children + */ + children: "children", + + /** + * path + */ + path: "path", + + /** + * ancestors + */ + ancestors: "ancestors", +} + +#suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" +union EntitySearchType { + string, + + /** + * AllowedParents + */ + AllowedParents: "AllowedParents", + + /** + * AllowedChildren + */ + AllowedChildren: "AllowedChildren", + + /** + * ParentAndFirstLevelChildren + */ + ParentAndFirstLevelChildren: "ParentAndFirstLevelChildren", + + /** + * ParentOnly + */ + ParentOnly: "ParentOnly", + + /** + * ChildrenOnly + */ + ChildrenOnly: "ChildrenOnly", +} + +#suppress "@azure-tools/typespec-azure-core/documentation-required" "For backward compatibility" +union EntityViewParameterType { + string, + + /** + * FullHierarchy + */ + FullHierarchy: "FullHierarchy", + + /** + * GroupsOnly + */ + GroupsOnly: "GroupsOnly", + + /** + * SubscriptionsOnly + */ + SubscriptionsOnly: "SubscriptionsOnly", + + /** + * Audit + */ + Audit: "Audit", +} + +/** + * The type of child resource. + */ +#suppress "@azure-tools/typespec-azure-core/no-enum" "For backward compatibility" +enum ManagementGroupChildType { + /** + * Microsoft.Management/managementGroups + */ + `Microsoft.Management/managementGroups`, + + /** + * /subscriptions + */ + `/subscriptions`, +} + +/** + * Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. + */ +#suppress "@azure-tools/typespec-azure-core/no-enum" "For backward compatibility" +enum Reason { + /** + * Invalid + */ + Invalid, + + /** + * AlreadyExists + */ + AlreadyExists, +} + +/** + * The users specific permissions to this item. + */ +#suppress "@azure-tools/typespec-azure-core/no-enum" "For backward compatibility" +enum Permissions { + /** + * noaccess + */ + noaccess, + + /** + * view + */ + view, + + /** + * edit + */ + edit, + + /** + * delete + */ + delete, +} + +/** + * The status of the Tenant Backfill + */ +#suppress "@azure-tools/typespec-azure-core/no-enum" "For backward compatibility" +enum Status { + /** + * NotStarted + */ + NotStarted, + + /** + * NotStartedButGroupsExist + */ + NotStartedButGroupsExist, + + /** + * Started + */ + Started, + + /** + * Failed + */ + Failed, + + /** + * Cancelled + */ + Cancelled, + + /** + * Completed + */ + Completed, +} + +/** + * Describes the result of the request to list management groups. + */ +model ManagementGroupListResult { + /** + * The list of management groups. + */ + @pageItems + value?: ManagementGroupInfo[]; + + /** + * The URL to use for getting the next set of results. + */ + @visibility(Lifecycle.Read) + @nextLink + `@nextLink`?: string; +} + +/** + * The management group resource. + */ +model ManagementGroupInfo { + /** + * The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The type of the resource. For example, Microsoft.Management/managementGroups + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The generic properties of a management group. + */ + properties?: ManagementGroupInfoProperties; +} + +/** + * The generic properties of a management group. + */ +model ManagementGroupInfoProperties { + /** + * The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + tenantId?: string; + + /** + * The friendly name of the management group. + */ + displayName?: string; +} + +/** + * The error object. + */ +@error +model ErrorResponse { + /** + * The details of the error. + */ + error?: ErrorDetails; +} + +/** + * The details of the error. + */ +model ErrorDetails { + /** + * One of a server-defined set of error codes. + */ + code?: string; + + /** + * A human-readable representation of the error. + */ + message?: string; + + /** + * A human-readable representation of the error's details. + */ + details?: string; +} + +/** + * The generic properties of a management group. + */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "For backward compatibility" +model ManagementGroupProperties { + /** + * The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + tenantId?: string; + + /** + * The friendly name of the management group. + */ + displayName?: string; + + /** + * The details of a management group. + */ + details?: ManagementGroupDetails; + + /** + * The list of children. + */ + children?: ManagementGroupChildInfo[]; +} + +/** + * The details of a management group. + */ +model ManagementGroupDetails { + /** + * The version number of the object. + */ + version?: int32; + + /** + * The date and time when this object was last updated. + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedTime?: utcDateTime; + + /** + * The identity of the principal or process that updated the object. + */ + updatedBy?: string; + + /** + * (Optional) The ID of the parent management group. + */ + parent?: ParentGroupInfo; + + /** + * The path from the root to the current group. + */ + @identifiers(#["name"]) + path?: ManagementGroupPathElement[]; + + /** + * The ancestors of the management group. + */ + managementGroupAncestors?: string[]; + + /** + * The ancestors of the management group displayed in reversed order, from immediate parent to the root. + */ + @identifiers(#["name"]) + managementGroupAncestorsChain?: ManagementGroupPathElement[]; +} + +/** + * (Optional) The ID of the parent management group. + */ +model ParentGroupInfo { + /** + * The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + id?: string; + + /** + * The name of the parent management group + */ + name?: string; + + /** + * The friendly name of the parent management group. + */ + displayName?: string; +} + +/** + * A path element of a management group ancestors. + */ +model ManagementGroupPathElement { + /** + * The name of the group. + */ + name?: string; + + /** + * The friendly name of the group. + */ + displayName?: string; +} + +/** + * The child information of a management group. + */ +model ManagementGroupChildInfo { + /** + * The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups) + */ + type?: ManagementGroupChildType; + + /** + * The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + id?: string; + + /** + * The name of the child entity. + */ + name?: string; + + /** + * The friendly name of the child resource. + */ + displayName?: string; + + /** + * The list of children. + */ + children?: ManagementGroupChildInfo[]; +} + +/** + * Management group creation parameters. + */ +model CreateManagementGroupRequest { + /** + * The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The type of the resource. For example, Microsoft.Management/managementGroups + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + name?: string; + + /** + * The generic properties of a management group used during creation. + */ + properties?: CreateManagementGroupProperties; +} + +/** + * The generic properties of a management group used during creation. + */ +model CreateManagementGroupProperties { + /** + * The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + tenantId?: string; + + /** + * The friendly name of the management group. If no value is passed then this field will be set to the groupId. + */ + displayName?: string; + + /** + * The details of a management group used during creation. + */ + details?: CreateManagementGroupDetails; + + /** + * The list of children. + */ + @visibility(Lifecycle.Read) + children?: CreateManagementGroupChildInfo[]; +} + +/** + * The details of a management group used during creation. + */ +model CreateManagementGroupDetails { + /** + * The version number of the object. + */ + @visibility(Lifecycle.Read) + version?: int32; + + /** + * The date and time when this object was last updated. + */ + @visibility(Lifecycle.Read) + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedTime?: utcDateTime; + + /** + * The identity of the principal or process that updated the object. + */ + @visibility(Lifecycle.Read) + updatedBy?: string; + + /** + * (Optional) The ID of the parent management group used during creation. + */ + parent?: CreateParentGroupInfo; +} + +/** + * (Optional) The ID of the parent management group used during creation. + */ +model CreateParentGroupInfo { + /** + * The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + id?: string; + + /** + * The name of the parent management group + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The friendly name of the parent management group. + */ + @visibility(Lifecycle.Read) + displayName?: string; +} + +/** + * The child information of a management group used during creation. + */ +model CreateManagementGroupChildInfo { + /** + * The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups) + */ + @visibility(Lifecycle.Read) + type?: ManagementGroupChildType; + + /** + * The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The name of the child entity. + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The friendly name of the child resource. + */ + @visibility(Lifecycle.Read) + displayName?: string; + + /** + * The list of children. + */ + @visibility(Lifecycle.Read) + children?: CreateManagementGroupChildInfo[]; +} + +/** + * The results of Azure-AsyncOperation. + */ +model AzureAsyncOperationResults { + /** + * The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The type of the resource. For example, Microsoft.Management/managementGroups + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The current status of the asynchronous operation performed . For example, Running, Succeeded, Failed + */ + @visibility(Lifecycle.Read) + status?: string; + + /** + * The generic properties of a management group. + */ + properties?: ManagementGroupInfoProperties; +} + +/** + * Management group patch parameters. + */ +model PatchManagementGroupRequest { + /** + * The friendly name of the management group. + */ + displayName?: string; + + /** + * (Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + parentGroupId?: string; +} + +/** + * The descendant. + */ +model DescendantInfo { + /** + * The fully qualified ID for the descendant. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 or /subscriptions/0000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The type of the resource. For example, Microsoft.Management/managementGroups or /subscriptions + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The name of the descendant. For example, 00000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The generic properties of an descendant. + */ + properties?: DescendantInfoProperties; +} + +/** + * The generic properties of an descendant. + */ +model DescendantInfoProperties { + /** + * The friendly name of the management group. + */ + displayName?: string; + + /** + * The ID of the parent management group. + */ + #suppress "@azure-tools/typespec-azure-core/no-nullable" "For backward compatibility" + parent?: DescendantParentGroupInfo | null; +} + +/** + * The ID of the parent management group. + */ +model DescendantParentGroupInfo { + /** + * The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + id?: string; +} + +/** + * The generic properties of subscription under a management group. + */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "For backward compatibility" +model SubscriptionUnderManagementGroupProperties { + /** + * The AAD Tenant ID associated with the subscription. For example, 00000000-0000-0000-0000-000000000000 + */ + tenant?: string; + + /** + * The friendly name of the subscription. + */ + displayName?: string; + + /** + * The ID of the parent management group. + */ + parent?: DescendantParentGroupInfo; + + /** + * The state of the subscription. + */ + state?: string; +} + +/** + * The details of all subscriptions under management group. + */ +model ListSubscriptionUnderManagementGroup + is Azure.Core.Page; + +/** + * Lists all hierarchy settings. + */ +model HierarchySettingsList { + /** + * The list of hierarchy settings. + */ + @pageItems + value?: HierarchySettingsInfo[]; + + /** + * The URL to use for getting the next set of results. + */ + @visibility(Lifecycle.Read) + `@nextLink`?: string; +} + +/** + * The hierarchy settings resource. + */ +model HierarchySettingsInfo { + /** + * The fully qualified ID for the settings object. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default. + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The type of the resource. For example, Microsoft.Management/managementGroups/settings. + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The name of the object. In this case, default. + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The generic properties of hierarchy settings. + */ + properties?: HierarchySettingsProperties; +} + +/** + * The generic properties of hierarchy settings. + */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "For backward compatibility" +model HierarchySettingsProperties { + /** + * The AAD Tenant ID associated with the hierarchy settings. For example, 00000000-0000-0000-0000-000000000000 + */ + tenantId?: string; + + /** + * Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will require Microsoft.Management/managementGroups/write action on the root Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating new Management Groups, unless they are given access. + */ + requireAuthorizationForGroupCreation?: boolean; + + /** + * Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup + */ + defaultManagementGroup?: string; +} + +/** + * Parameters for creating or updating Management Group settings + */ +model CreateOrUpdateSettingsRequest { + /** + * The properties of the request to create or update Management Group settings + */ + properties?: CreateOrUpdateSettingsProperties; +} + +/** + * The properties of the request to create or update Management Group settings + */ +model CreateOrUpdateSettingsProperties { + /** + * Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will require Microsoft.Management/managementGroups/write action on the root Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating new Management Groups, unless they are given access. + */ + requireAuthorizationForGroupCreation?: boolean; + + /** + * Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup + */ + defaultManagementGroup?: string; +} + +/** + * Operation supported by the Microsoft.Management resource provider. + */ +model Operation { + /** + * Operation name: {provider}/{resource}/{operation}. + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The object that represents the operation. + */ + display?: OperationDisplayProperties; +} + +/** + * The object that represents the operation. + */ +model OperationDisplayProperties { + /** + * The name of the provider. + */ + @visibility(Lifecycle.Read) + provider?: string; + + /** + * The resource on which the operation is performed. + */ + @visibility(Lifecycle.Read) + resource?: string; + + /** + * The operation that can be performed. + */ + @visibility(Lifecycle.Read) + operation?: string; + + /** + * Operation description. + */ + @visibility(Lifecycle.Read) + description?: string; +} + +/** + * Management group name availability check parameters. + */ +model CheckNameAvailabilityRequest { + /** + * the name to check for availability + */ + name?: string; + + /** + * fully qualified resource type which includes provider namespace + */ + type?: "Microsoft.Management/managementGroups"; +} + +/** + * Describes the result of the request to check management group name availability. + */ +model CheckNameAvailabilityResult { + /** + * Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both. + */ + @visibility(Lifecycle.Read) + nameAvailable?: boolean; + + /** + * Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable. + */ + @visibility(Lifecycle.Read) + reason?: Reason; + + /** + * Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name. + */ + @visibility(Lifecycle.Read) + message?: string; +} + +/** + * The entity. + */ +model EntityInfo { + /** + * The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The type of the resource. For example, Microsoft.Management/managementGroups + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The name of the entity. For example, 00000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The generic properties of an entity. + */ + properties?: EntityInfoProperties; +} + +/** + * The generic properties of an entity. + */ +model EntityInfoProperties { + /** + * The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000 + */ + tenantId?: string; + + /** + * The friendly name of the management group. + */ + displayName?: string; + + /** + * (Optional) The ID of the parent management group. + */ + parent?: EntityParentGroupInfo; + + /** + * The users specific permissions to this item. + */ + permissions?: Permissions; + + /** + * The users specific permissions to this item. + */ + inheritedPermissions?: Permissions; + + /** + * Number of Descendants + */ + numberOfDescendants?: int32; + + /** + * Number of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group. + */ + numberOfChildren?: int32; + + /** + * Number of children is the number of Groups that are exactly one level underneath the current Group. + */ + numberOfChildGroups?: int32; + + /** + * The parent display name chain from the root group to the immediate parent + */ + parentDisplayNameChain?: string[]; + + /** + * The parent name chain from the root group to the immediate parent + */ + parentNameChain?: string[]; +} + +/** + * (Optional) The ID of the parent management group. + */ +model EntityParentGroupInfo { + /** + * The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + id?: string; +} + +/** + * The tenant backfill status + */ +model TenantBackfillStatusResult { + /** + * The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + tenantId?: string; + + /** + * The status of the Tenant Backfill + */ + @visibility(Lifecycle.Read) + status?: Status; +} + +/** + * The results of an asynchronous operation. + */ +model OperationResults { + /** + * The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The type of the resource. For example, Microsoft.Management/managementGroups + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The generic properties of a management group. + */ + properties?: ManagementGroupInfoProperties; +} + +/** + * The management group details for the hierarchy view. + */ +model EntityHierarchyItem { + /** + * The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + id?: string; + + /** + * The type of the resource. For example, Microsoft.Management/managementGroups + */ + @visibility(Lifecycle.Read) + type?: string; + + /** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + */ + @visibility(Lifecycle.Read) + name?: string; + + /** + * The generic properties of a management group. + */ + properties?: EntityHierarchyItemProperties; +} + +/** + * The generic properties of a management group. + */ +model EntityHierarchyItemProperties { + /** + * The friendly name of the management group. + */ + displayName?: string; + + /** + * The users specific permissions to this item. + */ + permissions?: Permissions; + + /** + * The list of children. + */ + children?: EntityHierarchyItem[]; +} + +model EntityListResult is Azure.Core.Page; + +model DescendantListResult is Azure.Core.Page; diff --git a/specification/managementgroups/ManagementGroups.Management/routes.tsp b/specification/managementgroups/ManagementGroups.Management/routes.tsp new file mode 100644 index 000000000000..5fbe6fed99b1 --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/routes.tsp @@ -0,0 +1,146 @@ +// FIXME: Operations in this file are not detected as a resource operation, please confirm the conversion result manually + +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; +using TypeSpec.OpenAPI; + +namespace Microsoft.Management; + +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "For backward compatibility" +interface ManagementGroupsOperationGroup { + /** + * List management groups for the authenticated user. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + @operationId("ManagementGroups_List") + @autoRoute + @get + @list + @action("managementGroups") + list is ArmProviderActionSync< + Response = ManagementGroupListResult, + Parameters = { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + + /** + * Page continuation token is only used if a previous operation returned a partial result. + * If 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. + * + */ + @query("$skiptoken") + $skiptoken?: string; + } + >; +} + +/** + * Checks if the specified management group name is valid and unique + */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "For backward compatibility" +@autoRoute +op checkNameAvailability is ArmProviderActionSync< + Request = CheckNameAvailabilityRequest, + Response = CheckNameAvailabilityResult +>; +/** + * Starts backfilling subscriptions for the Tenant. + */ +@autoRoute +op startTenantBackfill is ArmProviderActionSync; +/** + * Gets tenant backfill status + */ +@autoRoute +op tenantBackfillStatus is ArmProviderActionSync; + +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator" "For backward compatibility" +interface EntitiesOperationGroup { + /** + * List all entities (Management Groups, Subscriptions, etc.) for the authenticated user. + * + */ + #suppress "@azure-tools/typespec-azure-core/no-openapi" "non-standard operations" + @operationId("Entities_List") + @autoRoute + @list + @action("getEntities") + list is ArmProviderActionSync< + Response = EntityListResult, + Parameters = { + /** + * Page continuation token is only used if a previous operation returned a partial result. + * If 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. + * + */ + @query("$skiptoken") + $skiptoken?: string; + + /** + * Number of entities to skip over when retrieving results. Passing this in will override $skipToken. + */ + @query("$skip") + $skip?: int32; + + /** + * Number of elements to return when retrieving results. Passing this in will override $skipToken. + */ + @query("$top") + $top?: int32; + + /** + * This parameter specifies the fields to include in the response. Can include any combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter can override select in $skipToken. + */ + @query("$select") + $select?: string; + + /** + * The $search parameter is used in conjunction with the $filter parameter to return three different outputs depending on the parameter passed in. + * With $search=AllowedParents the API will return the entity info of all groups that the requested entity will be able to reparent to as determined by the user's permissions. + * With $search=AllowedChildren the API will return the entity info of all entities that can be added as children of the requested entity. + * With $search=ParentAndFirstLevelChildren the API will return the parent and first level of children that the user has either direct access to or indirect access via one of their descendants. + * With $search=ParentOnly the API will return only the group if the user has access to at least one of the descendants of the group. + * With $search=ChildrenOnly the API will return only the first level of children of the group entity info specified in $filter. The user must have direct access to the children entities or one of it's descendants for it to show up in the results. + */ + @query("$search") + $search?: EntitySearchType; + + /** + * The filter parameter allows you to filter on the the name or display name fields. You can check for equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName, '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case insensitively. + */ + @query("$filter") + $filter?: string; + + /** + * The view parameter allows clients to filter the type of data that is returned by the getEntities call. + */ + @query("$view") + $view?: EntityViewParameterType; + + /** + * A filter which allows the get entities call to focus on a particular group (i.e. "$filter=name eq 'groupName'") + */ + @query("groupName") + groupName?: string; + + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. + */ + #suppress "@azure-tools/typespec-azure-core/casing-style" "For backward compatibility" + @header("Cache-Control") + `Cache-Control`?: string = "no-cache"; + } + >; +} diff --git a/specification/managementgroups/ManagementGroups.Management/tspconfig.yaml b/specification/managementgroups/ManagementGroups.Management/tspconfig.yaml new file mode 100644 index 000000000000..9070d325c75e --- /dev/null +++ b/specification/managementgroups/ManagementGroups.Management/tspconfig.yaml @@ -0,0 +1,52 @@ +parameters: + "service-dir": + default: "sdk/managementgroups" +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + omit-unreachable-types: true + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/ManagementGroups/{version-status}/{version}/management.json" + emit-lro-options: "all" + examples-dir: "{project-root}/examples" + "@azure-tools/typespec-csharp": + flavor: azure + emitter-output-dir: "{output-dir}/{service-dir}/Azure.ResourceManager.ManagementGroups" + clear-output-folder: true + model-namespace: true + namespace: "Azure.ResourceManager.ManagementGroups" + "@azure-tools/typespec-python": + emitter-output-dir: "{output-dir}/{service-dir}/azure-mgmt-managementgroups" + namespace: "azure.mgmt.managementgroups" + generate-test: true + generate-sample: true + flavor: "azure" + "@azure-tools/typespec-java": + emitter-output-dir: "{output-dir}/{service-dir}/azure-resourcemanager-managementgroups" + namespace: "com.azure.resourcemanager.managementgroups" + service-name: "ManagementGroups" # human-readable service name, whitespace allowed + flavor: azure + rename-model: + CheckNameAvailabilityRequestType: Type + add-inner: HierarchySettingsInfo + "@azure-tools/typespec-ts": + emitter-output-dir: "{output-dir}/{service-dir}/arm-managementgroups" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure/arm-managementgroups" + "@azure-tools/typespec-go": + service-dir: "sdk/resourcemanager/managementgroups" + emitter-output-dir: "{output-dir}/{service-dir}/armmanagementgroups" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/armmanagementgroups" + fix-const-stuttering: true + flavor: "azure" + generate-samples: true + generate-fakes: true + head-as-boolean: true + inject-spans: true +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/resource-manager" diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/AddManagementGroupSubscription.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/AddManagementGroupSubscription.json index a63d3372d0b0..1f4f2d1ee4a0 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/AddManagementGroupSubscription.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/AddManagementGroupSubscription.json @@ -1,16 +1,16 @@ { "parameters": { + "Cache-Control": "no-cache", "api-version": "2023-04-01", "groupId": "Group", - "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc", - "Cache-Control": "no-cache" + "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc" }, "responses": { "200": { "body": { "name": "728bcbe4-8d56-4510-86c2-4921b8beefbc", - "id": " /providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", "type": "Microsoft.Management/managementGroups/subscriptions", + "id": " /providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", "properties": { "displayName": "Group", "parent": { @@ -21,5 +21,7 @@ } } } - } + }, + "operationId": "ManagementGroupSubscriptions_Create", + "title": "AddSubscriptionToManagementGroup" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/CheckManagementGroupNameAvailability.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/CheckManagementGroupNameAvailability.json index feae5214b37b..d65833862c58 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/CheckManagementGroupNameAvailability.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/CheckManagementGroupNameAvailability.json @@ -1,19 +1,21 @@ { "parameters": { + "Cache-Control": "no-cache", "api-version": "2023-04-01", "checkNameAvailabilityRequest": { "name": "nameTocheck", "type": "Microsoft.Management/managementGroups" - }, - "Cache-Control": "no-cache" + } }, "responses": { "200": { "body": { + "message": "Error message", "nameAvailable": false, - "reason": "AlreadyExists", - "message": "Error message" + "reason": "AlreadyExists" } } - } + }, + "operationId": "CheckNameAvailability", + "title": "CheckManagementGroupNameAvailability" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/DeleteHierarchySettings.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/DeleteHierarchySettings.json index b08651d8be5b..7c42ed3c4994 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/DeleteHierarchySettings.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/DeleteHierarchySettings.json @@ -5,5 +5,7 @@ }, "responses": { "200": {} - } + }, + "operationId": "HierarchySettings_Delete", + "title": "GetGroupSettings" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/DeleteManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/DeleteManagementGroup.json index 49bcd57bb1ff..9874629ed1c9 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/DeleteManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/DeleteManagementGroup.json @@ -1,21 +1,23 @@ { "parameters": { + "Cache-Control": "no-cache", "api-version": "2023-04-01", - "groupId": "GroupToDelete", - "Cache-Control": "no-cache" + "groupId": "GroupToDelete" }, "responses": { "202": { - "headers": { - "Location": "https://management.azure.com/providers/Microsoft.Management/managementGroups/GroupToDelete?api-version=2023-04-01" - }, "body": { - "id": "/providers/Microsoft.Management/managementGroups/GroupToDelete", - "type": "Microsoft.Management/managementGroups", "name": "GroupToDelete", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/GroupToDelete", "status": "NotStarted" + }, + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Management/managementGroups/GroupToDelete?api-version=2023-04-01" } }, "204": {} - } + }, + "operationId": "ManagementGroups_Delete", + "title": "DeleteManagementGroup" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetAllSubscriptionsFromManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetAllSubscriptionsFromManagementGroup.json index aebc08c7bc1b..33960ed68396 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetAllSubscriptionsFromManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetAllSubscriptionsFromManagementGroup.json @@ -6,11 +6,12 @@ "responses": { "200": { "body": { + "nextLink": null, "value": [ { "name": "728bcbe4-8d56-4510-86c2-4921b8beefbc", - "id": "/providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", "type": "Microsoft.Management/managementGroups/subscriptions", + "id": "/providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", "properties": { "displayName": "S5", "parent": { @@ -20,9 +21,10 @@ "tenant": "e751ac82-623b-4913-8d74-22637c832373" } } - ], - "nextLink": null + ] } } - } + }, + "operationId": "ManagementGroupSubscriptions_GetSubscriptionsUnderManagementGroup", + "title": "GetAllSubscriptionsFromManagementGroup" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetDescendants.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetDescendants.json index 1ac22f342b18..064954aee38f 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetDescendants.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetDescendants.json @@ -6,11 +6,12 @@ "responses": { "200": { "body": { + "nextLink": null, "value": [ { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", "properties": { "displayName": "Group 1", "parent": { @@ -19,9 +20,9 @@ } }, { - "id": "/subscriptions/20000000-0004-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups/subscriptions", "name": "20000000-0004-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups/subscriptions", + "id": "/subscriptions/20000000-0004-0000-0000-000000000000", "properties": { "displayName": "Subscription 4", "parent": { @@ -29,9 +30,10 @@ } } } - ], - "nextLink": null + ] } } - } + }, + "operationId": "ManagementGroups_GetDescendants", + "title": "GetDescendants" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetEntities.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetEntities.json index bcc43c7183b0..7f8add94bd43 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetEntities.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetEntities.json @@ -5,19 +5,21 @@ "responses": { "200": { "body": { + "nextLink": null, "value": [ { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "displayName": "Group 1 Tenant 2", + "inheritedPermissions": "view", + "numberOfChildGroups": 1, + "numberOfChildren": 2, + "numberOfDescendants": 3, "parent": { "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" }, - "permissions": "view", - "inheritedPermissions": "view", "parentDisplayNameChain": [ "Tenant Root Group", "Group 1 Tenant 2 Parent" @@ -26,23 +28,23 @@ "TenantRootGroup", "Group1Tenant2Parent" ], - "numberOfDescendants": 3, - "numberOfChildren": 2, - "numberOfChildGroups": 1 + "permissions": "view", + "tenantId": "20000000-0000-0000-0000-000000000000" } }, { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0004-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0004-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0004-0000-0000-000000000000", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "displayName": "Group 4 Tenant 2", + "inheritedPermissions": "delete", + "numberOfChildGroups": 0, + "numberOfChildren": 0, + "numberOfDescendants": 0, "parent": { "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" }, - "permissions": "delete", - "inheritedPermissions": "delete", "parentDisplayNameChain": [ "Tenant Root Group", "Group 4 Tenant 2 Parent" @@ -51,14 +53,14 @@ "TenantRootGroup", "Group4 Tenant2Parent" ], - "numberOfDescendants": 0, - "numberOfChildren": 0, - "numberOfChildGroups": 0 + "permissions": "delete", + "tenantId": "20000000-0000-0000-0000-000000000000" } } - ], - "nextLink": null + ] } } - } + }, + "operationId": "Entities_List", + "title": "GetEntities" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetHierarchySettings.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetHierarchySettings.json index bfce79467112..90f7479e9b29 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetHierarchySettings.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetHierarchySettings.json @@ -6,15 +6,17 @@ "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", - "type": "Microsoft.Management/managementGroups/settings", "name": "root", + "type": "Microsoft.Management/managementGroups/settings", + "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", - "requireAuthorizationForGroupCreation": true + "requireAuthorizationForGroupCreation": true, + "tenantId": "20000000-0000-0000-0000-000000000000" } } } - } + }, + "operationId": "HierarchySettings_Get", + "title": "GetGroupSettings" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroup.json index 90bb627fe186..41e8f254fc25 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroup.json @@ -1,30 +1,32 @@ { "parameters": { + "Cache-Control": "no-cache", "api-version": "2023-04-01", - "groupId": "20000000-0001-0000-0000-000000000000", - "Cache-Control": "no-cache" + "groupId": "20000000-0001-0000-0000-000000000000" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000", "details": { - "version": 1, - "updatedTime": "2018-01-01T00:00:00.00Z", - "updatedBy": "16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b", "parent": { - "id": "/providers/Microsoft.Management/managementGroups/RootGroup", "name": "RootGroup", - "displayName": "RootGroup" - } + "displayName": "RootGroup", + "id": "/providers/Microsoft.Management/managementGroups/RootGroup" + }, + "updatedBy": "16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 } } } } - } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroup" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithAncestors.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithAncestors.json index 68101b795296..2906ff2c8877 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithAncestors.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithAncestors.json @@ -1,28 +1,20 @@ { "parameters": { - "api-version": "2023-04-01", - "groupId": "20000000-0001-0000-0000-00000000000", "$expand": "ancestors", - "Cache-Control": "no-cache" + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-00000000000" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000", "details": { - "version": 1, - "updatedTime": "2018-01-01T00:00:00.00Z", - "updatedBy": "Test", - "parent": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000001", - "name": "20000000-0000-0000-0000-000000000001", - "displayName": "Parent display name" - }, "managementGroupAncestorsChain": [ { "name": "20000000-0000-0000-0000-000000000001", @@ -32,10 +24,20 @@ "name": "20000000-0000-0000-0000-000000000000", "displayName": "Grandparent display name" } - ] + ], + "parent": { + "name": "20000000-0000-0000-0000-000000000001", + "displayName": "Parent display name", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000001" + }, + "updatedBy": "Test", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 } } } } - } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroupWithAncestors" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithExpand.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithExpand.json index 6434174c71c5..83c613adce56 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithExpand.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithExpand.json @@ -1,63 +1,65 @@ { "parameters": { - "api-version": "2023-04-01", - "groupId": "20000000-0001-0000-0000-000000000000", "$expand": "children", - "Cache-Control": "no-cache" + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-000000000000" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", - "displayName": "Group 1 Tenant 2", - "details": { - "version": 1, - "updatedTime": "2018-01-01T00:00:00.00Z", - "updatedBy": "Test", - "parent": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000", - "name": "20000000-0000-0000-0000-000000000000", - "displayName": "20000000-0000-0000-0000-000000000000" - } - }, "children": [ { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0002-0000-0000-000000000000", - "displayName": "Group 2 Tenant 2" + "type": "Microsoft.Management/managementGroups", + "displayName": "Group 2 Tenant 2", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0002-0000-0000-000000000000" }, { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0003-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0003-0000-0000-000000000000", - "displayName": "Group 3 Tenant 2" + "type": "Microsoft.Management/managementGroups", + "displayName": "Group 3 Tenant 2", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0003-0000-0000-000000000000" }, { - "id": "/subscriptions/10000000-F004-0000-0000-000000000000", - "type": "/subscriptions", "name": "10000000-F004-0000-0000-000000000000", - "displayName": "Subscription 4 Tenant 1" + "type": "/subscriptions", + "displayName": "Subscription 4 Tenant 1", + "id": "/subscriptions/10000000-F004-0000-0000-000000000000" }, { - "id": "/subscriptions/20000000-F005-0000-0000-000000000000", - "type": "/subscriptions", "name": "20000000-F005-0000-0000-000000000000", - "displayName": "Subscription 5 Tenant 2" + "type": "/subscriptions", + "displayName": "Subscription 5 Tenant 2", + "id": "/subscriptions/20000000-F005-0000-0000-000000000000" }, { - "id": "/subscriptions/30000000-F003-0000-0000-000000000000", - "type": "/subscriptions", "name": "30000000-F003-0000-0000-000000000000", - "displayName": "Subscription 3 Tenant 3" + "type": "/subscriptions", + "displayName": "Subscription 3 Tenant 3", + "id": "/subscriptions/30000000-F003-0000-0000-000000000000" } - ] + ], + "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "parent": { + "name": "20000000-0000-0000-0000-000000000000", + "displayName": "20000000-0000-0000-0000-000000000000", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" + }, + "updatedBy": "Test", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 + } } } } - } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroupWithExpand" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithExpandAndRecurse.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithExpandAndRecurse.json index 9b024ff4520f..fd875e466c67 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithExpandAndRecurse.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithExpandAndRecurse.json @@ -1,62 +1,64 @@ { "parameters": { - "api-version": "2023-04-01", - "groupId": "20000000-0001-0000-0000-000000000000", "$expand": "children", "$recurse": true, - "Cache-Control": "no-cache" + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-000000000000" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/RootGroup", - "type": "Microsoft.Management/managementGroups", "name": "RootGroup", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/RootGroup", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", - "displayName": "RootGroup", - "details": { - "version": 2, - "updatedTime": "2018-01-25T02:26:49.0022093Z", - "updatedBy": "bd490e30-04cb-433e-b8c8-6066959a8bab", - "parent": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000", - "name": "20000000-0000-0000-0000-000000000000", - "displayName": "20000000-0000-0000-0000-000000000000" - } - }, "children": [ { - "id": "/providers/Microsoft.Management/managementGroups/Child", - "type": "Microsoft.Management/managementGroups", "name": "Child", - "displayName": "Child", + "type": "Microsoft.Management/managementGroups", "children": [ { - "id": "/providers/Microsoft.Management/managementGroups/Leaf", - "type": "Microsoft.Management/managementGroups", "name": "Leaf", - "displayName": "Leaf", + "type": "Microsoft.Management/managementGroups", "children": [ { - "id": "/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", - "type": "/subscriptions", "name": "728bcbe4-8d56-4510-86c2-4921b8beefbc", - "displayName": "Pay-As-You-Go" + "type": "/subscriptions", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc" } - ] + ], + "displayName": "Leaf", + "id": "/providers/Microsoft.Management/managementGroups/Leaf" } - ] + ], + "displayName": "Child", + "id": "/providers/Microsoft.Management/managementGroups/Child" }, { - "id": "/providers/Microsoft.Management/managementGroups/AnotherChild", - "type": "Microsoft.Management/managementGroups", "name": "AnotherChild", - "displayName": "Leaf" + "type": "Microsoft.Management/managementGroups", + "displayName": "Leaf", + "id": "/providers/Microsoft.Management/managementGroups/AnotherChild" } - ] + ], + "displayName": "RootGroup", + "tenantId": "20000000-0000-0000-0000-000000000000", + "details": { + "parent": { + "name": "20000000-0000-0000-0000-000000000000", + "displayName": "20000000-0000-0000-0000-000000000000", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000000" + }, + "updatedBy": "bd490e30-04cb-433e-b8c8-6066959a8bab", + "updatedTime": "2018-01-25T02:26:49.0022093Z", + "version": 2 + } } } } - } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroupsWithExpandAndRecurse" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithPath.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithPath.json index 36374d7be9a6..3261cf638522 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithPath.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetManagementGroupWithPath.json @@ -1,28 +1,20 @@ { "parameters": { - "api-version": "2023-04-01", - "groupId": "20000000-0001-0000-0000-000000000000", "$expand": "path", - "Cache-Control": "no-cache" + "Cache-Control": "no-cache", + "api-version": "2023-04-01", + "groupId": "20000000-0001-0000-0000-000000000000" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000", "details": { - "version": 1, - "updatedTime": "2018-01-01T00:00:00.00Z", - "updatedBy": "Test", - "parent": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000001", - "name": "20000000-0000-0000-0000-000000000001", - "displayName": "Parent display name" - }, "path": [ { "name": "20000000-0000-0000-0000-000000000000", @@ -32,10 +24,20 @@ "name": "20000000-0000-0000-0000-000000000001", "displayName": "Parent display name" } - ] + ], + "parent": { + "name": "20000000-0000-0000-0000-000000000001", + "displayName": "Parent display name", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0000-0000-0000-000000000001" + }, + "updatedBy": "Test", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 } } } } - } + }, + "operationId": "ManagementGroups_Get", + "title": "GetManagementGroupWithPath" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetSubscriptionFromManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetSubscriptionFromManagementGroup.json index a63d3372d0b0..0b73d128fa52 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetSubscriptionFromManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/GetSubscriptionFromManagementGroup.json @@ -1,16 +1,16 @@ { "parameters": { + "Cache-Control": "no-cache", "api-version": "2023-04-01", "groupId": "Group", - "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc", - "Cache-Control": "no-cache" + "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc" }, "responses": { "200": { "body": { "name": "728bcbe4-8d56-4510-86c2-4921b8beefbc", - "id": " /providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", "type": "Microsoft.Management/managementGroups/subscriptions", + "id": " /providers/Microsoft.Management/managementGroups/Group/subscriptions/728bcbe4-8d56-4510-86c2-4921b8beefbc", "properties": { "displayName": "Group", "parent": { @@ -21,5 +21,7 @@ } } } - } + }, + "operationId": "ManagementGroupSubscriptions_GetSubscription", + "title": "GetSubscriptionFromManagementGroup" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListHierarchySettings.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListHierarchySettings.json index 06d37b87fc3e..b10607aa599a 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListHierarchySettings.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListHierarchySettings.json @@ -6,20 +6,22 @@ "responses": { "200": { "body": { + "@nextLink": null, "value": [ { - "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", - "type": "Microsoft.Management/managementGroups/settings", "name": "root", + "type": "Microsoft.Management/managementGroups/settings", + "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", - "requireAuthorizationForGroupCreation": true + "requireAuthorizationForGroupCreation": true, + "tenantId": "20000000-0000-0000-0000-000000000000" } } - ], - "@nextLink": null + ] } } - } + }, + "operationId": "HierarchySettings_List", + "title": "ListGroupSettings" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListManagementGroups.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListManagementGroups.json index a5053d5ade21..8d5799580661 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListManagementGroups.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListManagementGroups.json @@ -1,33 +1,35 @@ { "parameters": { - "api-version": "2023-04-01", - "Cache-Control": "no-cache" + "Cache-Control": "no-cache", + "api-version": "2023-04-01" }, "responses": { "200": { "body": { + "@nextLink": null, "value": [ { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0001-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", - "displayName": "Group 1 Tenant 2" + "displayName": "Group 1 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000" } }, { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0004-0000-0000-000000000000", - "type": "Microsoft.Management/managementGroups", "name": "20000000-0004-0000-0000-000000000000", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/20000000-0004-0000-0000-000000000000", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", - "displayName": "Group 4 Tenant 2" + "displayName": "Group 4 Tenant 2", + "tenantId": "20000000-0000-0000-0000-000000000000" } } - ], - "@nextLink": null + ] } } - } + }, + "operationId": "ManagementGroups_List", + "title": "ListManagementGroups" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListOperations.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListOperations.json index b9f9d3ce26cc..2903a79c9cba 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListOperations.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/ListOperations.json @@ -5,19 +5,21 @@ "responses": { "200": { "body": { + "nextLink": "aaaaaaaaaaaaaaaaaaa", "value": [ { "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "display": { - "provider": "aaaaaaaaaaaaaaaaaaaaa", - "resource": "aaaaaaaaaaaaa", + "description": "aaaaaaaaaaaaaaaaaaaaaa", "operation": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "description": "aaaaaaaaaaaaaaaaaaaaaa" + "provider": "aaaaaaaaaaaaaaaaaaaaa", + "resource": "aaaaaaaaaaaaa" } } - ], - "nextLink": "aaaaaaaaaaaaaaaaaaa" + ] } } - } + }, + "operationId": "Operations_List", + "title": "List Operations" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PatchHierarchySettings.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PatchHierarchySettings.json index 36c43ef1eef2..526fc6c08e3d 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PatchHierarchySettings.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PatchHierarchySettings.json @@ -1,26 +1,28 @@ { "parameters": { - "api-version": "2023-04-01", - "groupId": "root", "CreateTenantSettingsRequest": { "properties": { "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", "requireAuthorizationForGroupCreation": true } - } + }, + "api-version": "2023-04-01", + "groupId": "root" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", - "type": "Microsoft.Management/managementGroups/settings", "name": "root", + "type": "Microsoft.Management/managementGroups/settings", + "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", - "requireAuthorizationForGroupCreation": true + "requireAuthorizationForGroupCreation": true, + "tenantId": "20000000-0000-0000-0000-000000000000" } } } - } + }, + "operationId": "HierarchySettings_Update", + "title": "GetGroupSettings" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PatchManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PatchManagementGroup.json index b0eb6600a182..b64a17346dca 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PatchManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PatchManagementGroup.json @@ -1,34 +1,36 @@ { "parameters": { + "Cache-Control": "no-cache", "api-version": "2023-04-01", "groupId": "ChildGroup", "patchGroupRequest": { "displayName": "AlternateDisplayName", "parentGroupId": "/providers/Microsoft.Management/managementGroups/AlternateRootGroup" - }, - "Cache-Control": "no-cache" + } }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", - "type": "Microsoft.Management/managementGroups", "name": "ChildGroup", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "displayName": "AlternateDisplayName", + "tenantId": "20000000-0000-0000-0000-000000000000", "details": { - "version": 2, - "updatedTime": "2018-01-25T02:46:59.0545645Z", - "updatedBy": "bd490e30-04cb-433e-b8c8-6066959a8bab", "parent": { - "id": "/providers/Microsoft.Management/managementGroups/AlternateRootGroup", "name": "AlternateRootGroup", - "displayName": "AlternateRootGroup" - } + "displayName": "AlternateRootGroup", + "id": "/providers/Microsoft.Management/managementGroups/AlternateRootGroup" + }, + "updatedBy": "bd490e30-04cb-433e-b8c8-6066959a8bab", + "updatedTime": "2018-01-25T02:46:59.0545645Z", + "version": 2 } } } } - } + }, + "operationId": "ManagementGroups_Update", + "title": "PatchManagementGroup" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PutHierarchySettings.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PutHierarchySettings.json index 36c43ef1eef2..c673e37e6405 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PutHierarchySettings.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PutHierarchySettings.json @@ -1,26 +1,28 @@ { "parameters": { - "api-version": "2023-04-01", - "groupId": "root", "CreateTenantSettingsRequest": { "properties": { "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", "requireAuthorizationForGroupCreation": true } - } + }, + "api-version": "2023-04-01", + "groupId": "root" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", - "type": "Microsoft.Management/managementGroups/settings", "name": "root", + "type": "Microsoft.Management/managementGroups/settings", + "id": "/providers/Microsoft.Management/managementGroups/root/settings/default", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "defaultManagementGroup": "/providers/Microsoft.Management/managementGroups/DefaultGroup", - "requireAuthorizationForGroupCreation": true + "requireAuthorizationForGroupCreation": true, + "tenantId": "20000000-0000-0000-0000-000000000000" } } } - } + }, + "operationId": "HierarchySettings_CreateOrUpdate", + "title": "GetGroupSettings" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PutManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PutManagementGroup.json index 715dec6553e4..25ad25dcf77c 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PutManagementGroup.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/PutManagementGroup.json @@ -1,7 +1,7 @@ { "parameters": { + "Cache-Control": "no-cache", "api-version": "2023-04-01", - "groupId": "ChildGroup", "createManagementGroupRequest": { "properties": { "displayName": "ChildGroup", @@ -12,37 +12,39 @@ } } }, - "Cache-Control": "no-cache" + "groupId": "ChildGroup" }, "responses": { "200": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", - "type": "Microsoft.Management/managementGroups", "name": "ChildGroup", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", "properties": { - "tenantId": "20000000-0000-0000-0000-000000000000", "displayName": "ChildGroup", + "tenantId": "20000000-0000-0000-0000-000000000000", "details": { - "version": 1, - "updatedTime": "2018-01-01T00:00:00.00Z", - "updatedBy": "16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b", "parent": { - "id": "/providers/Microsoft.Management/managementGroups/RootGroup", "name": "RootGroup", - "displayName": "RootGroup" - } + "displayName": "RootGroup", + "id": "/providers/Microsoft.Management/managementGroups/RootGroup" + }, + "updatedBy": "16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b", + "updatedTime": "2018-01-01T00:00:00.00Z", + "version": 1 } } } }, "202": { "body": { - "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", - "type": "Microsoft.Management/managementGroups", "name": "ChildGroup", + "type": "Microsoft.Management/managementGroups", + "id": "/providers/Microsoft.Management/managementGroups/ChildGroup", "status": "NotStarted" } } - } + }, + "operationId": "ManagementGroups_CreateOrUpdate", + "title": "PutManagementGroup" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/RemoveManagementGroupSubscription.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/RemoveManagementGroupSubscription.json index 920bcf508614..d2428f23aebf 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/RemoveManagementGroupSubscription.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/RemoveManagementGroupSubscription.json @@ -1,12 +1,14 @@ { "parameters": { + "Cache-Control": "no-cache", "api-version": "2023-04-01", "groupId": "Group", - "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc", - "Cache-Control": "no-cache" + "subscriptionId": "728bcbe4-8d56-4510-86c2-4921b8beefbc" }, "responses": { "200": {}, "204": {} - } + }, + "operationId": "ManagementGroupSubscriptions_Delete", + "title": "DeleteSubscriptionFromManagementGroup" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/StartTenantBackfillRequest.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/StartTenantBackfillRequest.json index d9cf7b97d4a7..9792180a94e6 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/StartTenantBackfillRequest.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/StartTenantBackfillRequest.json @@ -6,9 +6,11 @@ "responses": { "200": { "body": { - "tenantId": "20000000-0000-0000-0000-000000000000", - "status": "Started" + "status": "Started", + "tenantId": "20000000-0000-0000-0000-000000000000" } } - } + }, + "operationId": "StartTenantBackfill", + "title": "StartTenantBackfill" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/TenantBackfillStatusRequest.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/TenantBackfillStatusRequest.json index a8d1c036d7f7..8fa389627587 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/TenantBackfillStatusRequest.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/examples/TenantBackfillStatusRequest.json @@ -6,9 +6,11 @@ "responses": { "200": { "body": { - "tenantId": "20000000-0000-0000-0000-000000000000", - "status": "Started" + "status": "Started", + "tenantId": "20000000-0000-0000-0000-000000000000" } } - } + }, + "operationId": "TenantBackfillStatus", + "title": "TenantBackfillStatus" } diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/management.json b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/management.json index f6e5e8a9dd9d..1f1e9bc2e357 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/management.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/ManagementGroups/stable/2023-04-01/management.json @@ -1,18 +1,23 @@ { "swagger": "2.0", - "host": "management.azure.com", "info": { - "version": "2023-04-01", "title": "Management Groups API", - "description": "The Azure Management Groups API enables consolidation of multiple \nsubscriptions/resources into an organizational hierarchy and centrally \nmanage access control, policies, alerting and reporting for those resources.\n" + "version": "2023-04-01", + "description": "The Azure Management Groups API enables consolidation of multiple\nsubscriptions/resources into an organizational hierarchy and centrally\nmanage access control, policies, alerting and reporting for those resources.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] }, "schemes": [ "https" ], - "consumes": [ + "host": "management.azure.com", + "produces": [ "application/json" ], - "produces": [ + "consumes": [ "application/json" ], "security": [ @@ -25,9 +30,9 @@ "securityDefinitions": { "azure_auth": { "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } @@ -35,99 +40,360 @@ }, "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" + "name": "Operations" + }, + { + "name": "ManagementGroups" }, { - "name": "Operations", - "description": "Management operations supported by the Microsoft.Management resource provider.\n" + "name": "SubscriptionUnderManagementGroups" }, { - "name": "Entities", - "description": "A list of entities that belong to the Management Groups.\n" + "name": "HierarchySettingsOperationGroup" } ], "paths": { + "/providers/Microsoft.Management/checkNameAvailability": { + "post": { + "operationId": "CheckNameAvailability", + "description": "Checks if the specified management group name is valid and unique", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "checkNameAvailabilityRequest", + "in": "body", + "description": "The request body", + "required": true, + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CheckNameAvailabilityResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CheckManagementGroupNameAvailability": { + "$ref": "./examples/CheckManagementGroupNameAvailability.json" + } + } + } + }, + "/providers/Microsoft.Management/getEntities": { + "post": { + "operationId": "Entities_List", + "description": "List all entities (Management Groups, Subscriptions, etc.) for the authenticated user.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "$skiptoken", + "in": "query", + "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.", + "required": false, + "type": "string" + }, + { + "name": "$skip", + "in": "query", + "description": "Number of entities to skip over when retrieving results. Passing this in will override $skipToken.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$top", + "in": "query", + "description": "Number of elements to return when retrieving results. Passing this in will override $skipToken.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "$select", + "in": "query", + "description": "This parameter specifies the fields to include in the response. Can include any combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter can override select in $skipToken.", + "required": false, + "type": "string" + }, + { + "name": "$search", + "in": "query", + "description": "The $search parameter is used in conjunction with the $filter parameter to return three different outputs depending on the parameter passed in.\nWith $search=AllowedParents the API will return the entity info of all groups that the requested entity will be able to reparent to as determined by the user's permissions.\nWith $search=AllowedChildren the API will return the entity info of all entities that can be added as children of the requested entity.\nWith $search=ParentAndFirstLevelChildren the API will return the parent and first level of children that the user has either direct access to or indirect access via one of their descendants.\nWith $search=ParentOnly the API will return only the group if the user has access to at least one of the descendants of the group.\nWith $search=ChildrenOnly the API will return only the first level of children of the group entity info specified in $filter. The user must have direct access to the children entities or one of it's descendants for it to show up in the results.", + "required": false, + "type": "string", + "enum": [ + "AllowedParents", + "AllowedChildren", + "ParentAndFirstLevelChildren", + "ParentOnly", + "ChildrenOnly" + ], + "x-ms-enum": { + "name": "EntitySearchType", + "modelAsString": true, + "values": [ + { + "name": "AllowedParents", + "value": "AllowedParents", + "description": "AllowedParents" + }, + { + "name": "AllowedChildren", + "value": "AllowedChildren", + "description": "AllowedChildren" + }, + { + "name": "ParentAndFirstLevelChildren", + "value": "ParentAndFirstLevelChildren", + "description": "ParentAndFirstLevelChildren" + }, + { + "name": "ParentOnly", + "value": "ParentOnly", + "description": "ParentOnly" + }, + { + "name": "ChildrenOnly", + "value": "ChildrenOnly", + "description": "ChildrenOnly" + } + ] + } + }, + { + "name": "$filter", + "in": "query", + "description": "The filter parameter allows you to filter on the the name or display name fields. You can check for equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName, '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case insensitively.", + "required": false, + "type": "string" + }, + { + "name": "$view", + "in": "query", + "description": "The view parameter allows clients to filter the type of data that is returned by the getEntities call.", + "required": false, + "type": "string", + "enum": [ + "FullHierarchy", + "GroupsOnly", + "SubscriptionsOnly", + "Audit" + ], + "x-ms-enum": { + "name": "EntityViewParameterType", + "modelAsString": true, + "values": [ + { + "name": "FullHierarchy", + "value": "FullHierarchy", + "description": "FullHierarchy" + }, + { + "name": "GroupsOnly", + "value": "GroupsOnly", + "description": "GroupsOnly" + }, + { + "name": "SubscriptionsOnly", + "value": "SubscriptionsOnly", + "description": "SubscriptionsOnly" + }, + { + "name": "Audit", + "value": "Audit", + "description": "Audit" + } + ] + } + }, + { + "name": "groupName", + "in": "query", + "description": "A filter which allows the get entities call to focus on a particular group (i.e. \"$filter=name eq 'groupName'\")", + "required": false, + "type": "string" + }, + { + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/EntityListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetEntities": { + "$ref": "./examples/GetEntities.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, "/providers/Microsoft.Management/managementGroups": { "get": { - "tags": [ - "ManagementGroups" - ], "operationId": "ManagementGroups_List", - "description": "List management groups for the authenticated user.\n", + "description": "List management groups for the authenticated user.", "parameters": [ { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/CacheControlHeader" + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" }, { - "$ref": "#/parameters/SkipTokenParameter" + "name": "$skiptoken", + "in": "query", + "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.", + "required": false, + "type": "string" } ], "responses": { "200": { - "description": "OK", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ManagementGroupListResult" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, "x-ms-examples": { "ListManagementGroups": { "$ref": "./examples/ListManagementGroups.json" } + }, + "x-ms-pageable": { + "nextLinkName": "@nextLink" } } }, "/providers/Microsoft.Management/managementGroups/{groupId}": { "get": { + "operationId": "ManagementGroups_Get", "tags": [ "ManagementGroups" ], - "operationId": "ManagementGroups_Get", - "description": "Get the details of the management group.\n", + "description": "Get the details of the management group.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/ExpandParameter" + "name": "$expand", + "in": "query", + "description": "The $expand=children query string parameter allows clients to request inclusion of children in the response payload. $expand=path includes the path from the root group to the current group. $expand=ancestors includes the ancestor Ids of the current group.", + "required": false, + "type": "string", + "enum": [ + "children", + "path", + "ancestors" + ], + "x-ms-enum": { + "name": "ManagementGroupExpandType", + "modelAsString": true, + "values": [ + { + "name": "children", + "value": "children", + "description": "children" + }, + { + "name": "path", + "value": "path", + "description": "path" + }, + { + "name": "ancestors", + "value": "ancestors", + "description": "ancestors" + } + ] + } }, { - "$ref": "#/parameters/RecurseParameter" + "name": "$recurse", + "in": "query", + "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.", + "required": false, + "type": "boolean" }, { - "$ref": "#/parameters/FilterParameter" + "name": "$filter", + "in": "query", + "description": "A filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType ne Subscription')", + "required": false, + "type": "string" }, { - "$ref": "#/parameters/CacheControlHeader" + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagementGroup" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -135,67 +401,83 @@ "GetManagementGroup": { "$ref": "./examples/GetManagementGroup.json" }, - "GetManagementGroupWithPath": { - "$ref": "./examples/GetManagementGroupWithPath.json" - }, "GetManagementGroupWithAncestors": { "$ref": "./examples/GetManagementGroupWithAncestors.json" }, "GetManagementGroupWithExpand": { "$ref": "./examples/GetManagementGroupWithExpand.json" }, + "GetManagementGroupWithPath": { + "$ref": "./examples/GetManagementGroupWithPath.json" + }, "GetManagementGroupsWithExpandAndRecurse": { "$ref": "./examples/GetManagementGroupWithExpandAndRecurse.json" } } }, "put": { + "operationId": "ManagementGroups_CreateOrUpdate", "tags": [ "ManagementGroups" ], - "operationId": "ManagementGroups_CreateOrUpdate", - "description": "Create or update a management group.\nIf a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated.\n", + "description": "Create or update a management group.\nIf 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": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/CacheControlHeader" + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" }, { - "$ref": "#/parameters/CreateManagementGroupRequestParameter" + "name": "createManagementGroupRequest", + "in": "body", + "description": "Management group creation parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/CreateManagementGroupRequest" + } } ], "responses": { "200": { - "description": "OK", + "description": "Resource 'ManagementGroup' update operation succeeded", "schema": { "$ref": "#/definitions/ManagementGroup" } }, "202": { - "description": "Accepted", + "description": "The request has been accepted for processing, but processing has not yet completed.", "schema": { "$ref": "#/definitions/AzureAsyncOperationResults" }, "headers": { - "Location": { - "description": "URL for determining when an operation has completed. Send a GET request to the URL in Location header.\nThe URI should return a 202 until the operation reaches a terminal state and 200 once it reaches a terminal state.\n\nFor more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers", - "type": "string" - }, "Azure-AsyncOperation": { - "description": "URL for checking the ongoing status of the operation.\nTo get the status of the asynchronous operation, send a GET request to the URL in Azure-AsyncOperation header value.\n\nFor more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations", - "type": "string" + "type": "string", + "format": "uri", + "description": "A link to the status monitor" + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." } } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -204,42 +486,57 @@ "$ref": "./examples/PutManagementGroup.json" } }, - "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" - } + }, + "x-ms-long-running-operation": true }, "patch": { + "operationId": "ManagementGroups_Update", "tags": [ "ManagementGroups" ], - "operationId": "ManagementGroups_Update", - "description": "Update a management group.\n", + "description": "Update a management group.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/CacheControlHeader" + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" }, { - "$ref": "#/parameters/PatchGroupRequestParameter" + "name": "patchGroupRequest", + "in": "body", + "description": "Management group patch parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/PatchManagementGroupRequest" + } } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagementGroup" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -250,46 +547,61 @@ } }, "delete": { + "operationId": "ManagementGroups_Delete", "tags": [ "ManagementGroups" ], - "operationId": "ManagementGroups_Delete", - "description": "Delete management group.\nIf a management group contains child resources, the request will fail.\n", + "description": "Delete management group.\nIf a management group contains child resources, the request will fail.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/CacheControlHeader" + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" } ], "responses": { "202": { - "description": "Accepted", + "description": "The request has been accepted for processing, but processing has not yet completed.", "schema": { "$ref": "#/definitions/AzureAsyncOperationResults" }, "headers": { + "Azure-AsyncOperation": { + "type": "string", + "format": "uri", + "description": "A link to the status monitor" + }, "Location": { - "description": "URL for determining when an operation has completed. Send a GET request to the URL in Location header.\nThe URI should return a 202 until the operation reaches a terminal state and 200 once it reaches a terminal state.\n\nFor more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers", - "type": "string" + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." }, - "Azure-AsyncOperation": { - "description": "URL for checking the ongoing status of the operation.\nTo get the status of the asynchronous operation, send a GET request to the URL in Azure-AsyncOperation header value.\n\nFor more info: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations", - "type": "string" + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } } }, "204": { - "description": "NoContent" + "description": "Resource does not exist." }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -298,556 +610,546 @@ "$ref": "./examples/DeleteManagementGroup.json" } }, - "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" - } + }, + "x-ms-long-running-operation": true } }, "/providers/Microsoft.Management/managementGroups/{groupId}/descendants": { "get": { + "operationId": "ManagementGroups_GetDescendants", "tags": [ "ManagementGroups" ], - "operationId": "ManagementGroups_GetDescendants", - "description": "List all entities that descend from a management group.\n", + "description": "List all entities that descend from a management group.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/SkipTokenParameter" + "name": "$skiptoken", + "in": "query", + "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.", + "required": false, + "type": "string" }, { - "$ref": "#/parameters/TopParameter" + "name": "$top", + "in": "query", + "description": "Number of elements to return when retrieving results. Passing this in will override $skipToken.", + "required": false, + "type": "integer", + "format": "int32" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/DescendantListResult" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "GetDescendants": { "$ref": "./examples/GetDescendants.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, - "/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}": { - "put": { + "/providers/Microsoft.Management/managementGroups/{groupId}/settings": { + "get": { + "operationId": "HierarchySettings_List", "tags": [ "ManagementGroups" ], - "operationId": "ManagementGroupSubscriptions_Create", - "description": "Associates existing subscription with the management group.\n", + "description": "Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/SubscriptionUnderManagementGroup" + "$ref": "#/definitions/HierarchySettingsList" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "AddSubscriptionToManagementGroup": { - "$ref": "./examples/AddManagementGroupSubscription.json" + "ListGroupSettings": { + "$ref": "./examples/ListHierarchySettings.json" } } - }, - "delete": { + } + }, + "/providers/Microsoft.Management/managementGroups/{groupId}/settings/default": { + "get": { + "operationId": "HierarchySettings_Get", "tags": [ - "ManagementGroups" + "HierarchySettingsOperationGroup" ], - "operationId": "ManagementGroupSubscriptions_Delete", - "description": "De-associates subscription from the management group.\n", + "description": "Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" } ], "responses": { "200": { - "description": "OK" - }, - "204": { - "description": "NoContent" + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/HierarchySettings" + } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "DeleteSubscriptionFromManagementGroup": { - "$ref": "./examples/RemoveManagementGroupSubscription.json" + "GetGroupSettings": { + "$ref": "./examples/GetHierarchySettings.json" } } }, - "get": { + "put": { + "operationId": "HierarchySettings_CreateOrUpdate", "tags": [ - "ManagementGroups" + "HierarchySettingsOperationGroup" ], - "operationId": "ManagementGroupSubscriptions_GetSubscription", - "description": "Retrieves details about given subscription which is associated with the management group.\n", + "description": "Creates or updates the hierarchy settings defined at the Management Group level.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/CacheControlHeader" + "name": "CreateTenantSettingsRequest", + "in": "body", + "description": "Tenant level settings request parameter.", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrUpdateSettingsRequest" + } } ], "responses": { "200": { - "description": "OK", + "description": "Resource 'HierarchySettings' update operation succeeded", "schema": { - "$ref": "#/definitions/SubscriptionUnderManagementGroup" + "$ref": "#/definitions/HierarchySettings" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "GetSubscriptionFromManagementGroup": { - "$ref": "./examples/GetSubscriptionFromManagementGroup.json" + "GetGroupSettings": { + "$ref": "./examples/PutHierarchySettings.json" } } - } - }, - "/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions": { - "get": { + }, + "patch": { + "operationId": "HierarchySettings_Update", "tags": [ - "ManagementGroups" + "HierarchySettingsOperationGroup" ], - "operationId": "ManagementGroupSubscriptions_GetSubscriptionsUnderManagementGroup", - "description": "Retrieves details about all subscriptions which are associated with the management group.\n", + "description": "Updates the hierarchy settings defined at the Management Group level.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/SkipTokenParameter" + "name": "CreateTenantSettingsRequest", + "in": "body", + "description": "Tenant level settings request parameter.", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrUpdateSettingsRequest" + } } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/ListSubscriptionUnderManagementGroup" + "$ref": "#/definitions/HierarchySettings" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { - "GetAllSubscriptionsFromManagementGroup": { - "$ref": "./examples/GetAllSubscriptionsFromManagementGroup.json" + "GetGroupSettings": { + "$ref": "./examples/PatchHierarchySettings.json" } } - } - }, - "/providers/Microsoft.Management/managementGroups/{groupId}/settings": { - "get": { + }, + "delete": { + "operationId": "HierarchySettings_Delete", "tags": [ - "ManagementGroups" + "HierarchySettingsOperationGroup" ], - "operationId": "HierarchySettings_List", - "description": "Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy.\n", + "description": "Deletes the hierarchy settings defined at the Management Group level.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" } ], "responses": { "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/HierarchySettingsList" - } + "description": "Resource deleted successfully." }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "ListGroupSettings": { - "$ref": "./examples/ListHierarchySettings.json" + "GetGroupSettings": { + "$ref": "./examples/DeleteHierarchySettings.json" } } } }, - "/providers/Microsoft.Management/managementGroups/{groupId}/settings/default": { + "/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions": { "get": { + "operationId": "ManagementGroupSubscriptions_GetSubscriptionsUnderManagementGroup", "tags": [ - "ManagementGroups" + "SubscriptionUnderManagementGroups" ], - "operationId": "HierarchySettings_Get", - "description": "Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy.\n", + "description": "Retrieves details about all subscriptions which are associated with the management group.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "$skiptoken", + "in": "query", + "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.", + "required": false, + "type": "string" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/HierarchySettings" + "$ref": "#/definitions/ListSubscriptionUnderManagementGroup" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "GetGroupSettings": { - "$ref": "./examples/GetHierarchySettings.json" + "GetAllSubscriptionsFromManagementGroup": { + "$ref": "./examples/GetAllSubscriptionsFromManagementGroup.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } - }, - "put": { + } + }, + "/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}": { + "get": { + "operationId": "ManagementGroupSubscriptions_GetSubscription", "tags": [ - "ManagementGroups" + "SubscriptionUnderManagementGroups" ], - "operationId": "HierarchySettings_CreateOrUpdate", - "description": "Creates or updates the hierarchy settings defined at the Management Group level.\n", + "description": "Retrieves details about given subscription which is associated with the management group.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "subscriptionId", + "in": "path", + "description": "Subscription ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/CreateOrUpdateManagementGroupSettingsRequestParameter" + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" } ], "responses": { "200": { - "description": "OK", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/HierarchySettings" + "$ref": "#/definitions/SubscriptionUnderManagementGroup" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "GetGroupSettings": { - "$ref": "./examples/PutHierarchySettings.json" + "GetSubscriptionFromManagementGroup": { + "$ref": "./examples/GetSubscriptionFromManagementGroup.json" } } }, - "patch": { + "put": { + "operationId": "ManagementGroupSubscriptions_Create", "tags": [ - "ManagementGroups" + "SubscriptionUnderManagementGroups" ], - "operationId": "HierarchySettings_Update", - "description": "Updates the hierarchy settings defined at the Management Group level.\n", + "description": "Associates existing subscription with the management group.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" + }, + { + "name": "subscriptionId", + "in": "path", + "description": "Subscription ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/CreateOrUpdateManagementGroupSettingsRequestParameter" + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" } ], "responses": { "200": { - "description": "OK", + "description": "Resource 'SubscriptionUnderManagementGroup' update operation succeeded", "schema": { - "$ref": "#/definitions/HierarchySettings" + "$ref": "#/definitions/SubscriptionUnderManagementGroup" } }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "GetGroupSettings": { - "$ref": "./examples/PatchHierarchySettings.json" + "AddSubscriptionToManagementGroup": { + "$ref": "./examples/AddManagementGroupSubscription.json" } } }, "delete": { + "operationId": "ManagementGroupSubscriptions_Delete", "tags": [ - "ManagementGroups" + "SubscriptionUnderManagementGroups" ], - "operationId": "HierarchySettings_Delete", - "description": "Deletes the hierarchy settings defined at the Management Group level.\n", + "description": "De-associates subscription from the management group.", "parameters": [ { - "$ref": "#/parameters/GroupIdParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "groupId", + "in": "path", + "description": "Management Group ID.", + "required": true, + "type": "string" + }, + { + "name": "subscriptionId", + "in": "path", + "description": "Subscription ID.", + "required": true, + "type": "string" }, { - "$ref": "#/parameters/ApiVersionParameter" + "name": "Cache-Control", + "in": "header", + "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", + "required": false, + "type": "string", + "default": "no-cache" } ], "responses": { "200": { - "description": "OK" + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." }, "default": { - "description": "Error", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { - "GetGroupSettings": { - "$ref": "./examples/DeleteHierarchySettings.json" + "DeleteSubscriptionFromManagementGroup": { + "$ref": "./examples/RemoveManagementGroupSubscription.json" } } } }, "/providers/Microsoft.Management/operations": { "get": { + "operationId": "Operations_List", "tags": [ "Operations" ], - "operationId": "Operations_List", - "description": "Lists all of the available Management REST API operations.", + "description": "List the operations for the provider", "parameters": [ { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "OK. The request has succeeded.", + "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/OperationListResult" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "List Operations": { "$ref": "./examples/ListOperations.json" } - } - } - }, - "/providers/Microsoft.Management/checkNameAvailability": { - "post": { - "tags": [ - "CheckNameAvailability" - ], - "operationId": "CheckNameAvailability", - "description": "Checks if the specified management group name is valid and unique", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CheckNameAvailabilityParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/CheckNameAvailabilityResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "CheckManagementGroupNameAvailability": { - "$ref": "./examples/CheckManagementGroupNameAvailability.json" - } - } - } - }, - "/providers/Microsoft.Management/getEntities": { - "post": { - "tags": [ - "Entities" - ], - "operationId": "Entities_List", - "description": "List all entities (Management Groups, Subscriptions, etc.) for the authenticated user.\n", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/SkipTokenParameter" - }, - { - "$ref": "#/parameters/SkipParameter" - }, - { - "$ref": "#/parameters/TopParameter" - }, - { - "$ref": "#/parameters/SelectParameter" - }, - { - "$ref": "#/parameters/SearchParameter" - }, - { - "$ref": "#/parameters/EntityFilterParameter" - }, - { - "$ref": "#/parameters/EntityViewParameter" - }, - { - "$ref": "#/parameters/GroupNameParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/EntityListResult" - } - }, - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } }, "x-ms-pageable": { "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "GetEntities": { - "$ref": "./examples/GetEntities.json" - } } } }, "/providers/Microsoft.Management/startTenantBackfill": { "post": { - "tags": [ - "TenantBackfill" - ], "operationId": "StartTenantBackfill", "description": "Starts backfilling subscriptions for the Tenant.", "parameters": [ { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "OK. The request has succeeded.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/TenantBackfillStatusResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -860,27 +1162,24 @@ }, "/providers/Microsoft.Management/tenantBackfillStatus": { "post": { - "tags": [ - "TenantBackfill" - ], "operationId": "TenantBackfillStatus", "description": "Gets tenant backfill status", "parameters": [ { - "$ref": "#/parameters/ApiVersionParameter" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { - "description": "OK. The request has succeeded.", + "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/TenantBackfillStatusResult" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/ErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -893,510 +1192,169 @@ } }, "definitions": { - "ErrorResponse": { - "description": "The error object.", - "properties": { - "error": { - "title": "Error", - "$ref": "#/definitions/ErrorDetails" - } - } - }, - "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" - } - } - }, - "Operation": { - "description": "Operation supported by the Microsoft.Management resource provider.", + "AzureAsyncOperationResults": { "type": "object", + "description": "The results of Azure-AsyncOperation.", "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", + "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 }, - "display": { - "title": "Display", - "$ref": "#/definitions/OperationDisplayProperties" - } - } - }, - "OperationDisplayProperties": { - "description": "The object that represents the operation.", - "properties": { - "provider": { - "description": "The name of the provider.", + "type": { "type": "string", + "description": "The type of the resource. For example, Microsoft.Management/managementGroups", "readOnly": true }, - "resource": { - "description": "The resource on which the operation is performed.", + "name": { "type": "string", + "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000", "readOnly": true }, - "operation": { - "description": "The operation that can be performed.", + "status": { "type": "string", + "description": "The current status of the asynchronous operation performed . For example, Running, Succeeded, Failed", "readOnly": true }, - "description": { - "description": "Operation description.", - "type": "string", - "readOnly": true + "properties": { + "$ref": "#/definitions/ManagementGroupInfoProperties", + "description": "The generic properties of a management group.", + "x-ms-client-flatten": true } } }, - "OperationListResult": { - "description": "Describes the result of the request to list Microsoft.Management operations.", + "CheckNameAvailabilityRequest": { + "type": "object", + "description": "Management group name availability check parameters.", "properties": { - "value": { - "description": "List of operations supported by the Microsoft.Management resource provider.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - }, - "x-ms-identifiers": [ - "name" - ] + "name": { + "type": "string", + "description": "the name to check for availability" }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", + "type": { "type": "string", - "readOnly": true + "description": "fully qualified resource type which includes provider namespace", + "enum": [ + "Microsoft.Management/managementGroups" + ], + "x-ms-enum": { + "modelAsString": false + } } } }, "CheckNameAvailabilityResult": { + "type": "object", "description": "Describes the result of the request to check management group name availability.", "properties": { "nameAvailable": { - "description": "Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both.", "type": "boolean", + "description": "Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both.", "readOnly": true }, "reason": { + "$ref": "#/definitions/Reason", "description": "Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.", - "type": "string", - "enum": [ - "Invalid", - "AlreadyExists" - ], - "x-ms-enum": { - "name": "Reason", - "modelAsString": false, - "values": [ - { - "value": "Invalid" - }, - { - "value": "AlreadyExists" - } - ] - }, "readOnly": true }, "message": { - "description": "Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name.", "type": "string", + "description": "Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that is already in use, and direct them to select a different name.", "readOnly": true } } }, - "TenantBackfillStatusResult": { - "description": "The tenant backfill status", + "CreateManagementGroupChildInfo": { + "type": "object", + "description": "The child information of a management group used during creation.", "properties": { - "tenantId": { - "type": "string", - "description": "The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000", + "type": { + "$ref": "#/definitions/ManagementGroupChildType", + "description": "The fully qualified resource type which includes provider namespace (e.g. Microsoft.Management/managementGroups)", "readOnly": true }, - "status": { - "description": "The status of the Tenant Backfill", + "id": { "type": "string", - "enum": [ - "NotStarted", - "NotStartedButGroupsExist", - "Started", - "Failed", - "Cancelled", - "Completed" - ], - "x-ms-enum": { - "name": "Status", - "modelAsString": false, - "values": [ - { - "value": "NotStarted" - }, - { - "value": "NotStartedButGroupsExist" - }, - { - "value": "Started" - }, - { - "value": "Failed" - }, - { - "value": "Cancelled" - }, - { - "value": "Completed" - } - ] - }, + "description": "The fully qualified ID for the child resource (management group or subscription). For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", "readOnly": true - } - } - }, - "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": { + "name": { "type": "string", - "description": "The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", + "description": "The name of the child entity.", "readOnly": true }, - "type": { + "displayName": { "type": "string", - "description": "The type of the resource. For example, Microsoft.Management/managementGroups", + "description": "The friendly name of the child resource.", "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" - } - } - }, - "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." - } - } - }, - "ListSubscriptionUnderManagementGroup": { - "description": "The details of all subscriptions under management group.", - "properties": { - "value": { - "description": "The list of subscriptions.", + "children": { "type": "array", + "description": "The list of children.", "items": { - "$ref": "#/definitions/SubscriptionUnderManagementGroup" - } - }, - "nextLink": { - "description": "The URL to use for getting the next set of results.", - "type": "string", - "readOnly": true - } - } - }, - "SubscriptionUnderManagementGroup": { - "description": "The details of subscription under management group.", - "x-ms-azure-resource": true, - "properties": { - "id": { - "type": "string", - "description": "The fully qualified ID for the subscription. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/subscriptions/0000000-0000-0000-0000-000000000001", - "readOnly": true - }, - "type": { - "type": "string", - "description": "The type of the resource. For example, Microsoft.Management/managementGroups/subscriptions", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The stringified id of the subscription. For example, 00000000-0000-0000-0000-000000000000", + "$ref": "#/definitions/CreateManagementGroupChildInfo" + }, "readOnly": true - }, - "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "$ref": "#/definitions/SubscriptionUnderManagementGroupProperties" } } }, - "SubscriptionUnderManagementGroupProperties": { - "description": "The generic properties of subscription under a management group.", + "CreateManagementGroupDetails": { "type": "object", + "description": "The details of a management group used during creation.", "properties": { - "tenant": { - "type": "string", - "description": "The AAD Tenant ID associated with the subscription. For example, 00000000-0000-0000-0000-000000000000" - }, - "displayName": { - "type": "string", - "description": "The friendly name of the subscription." - }, - "parent": { - "title": "Parent", - "$ref": "#/definitions/DescendantParentGroupInfo", - "x-nullable": true - }, - "state": { - "type": "string", - "description": "The state of the subscription." - } - } - }, - "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", + "version": { + "type": "integer", + "format": "int32", + "description": "The version number of the object.", "readOnly": true }, - "type": { + "updatedTime": { "type": "string", - "description": "The type of the resource. For example, Microsoft.Management/managementGroups", + "format": "date-time", + "description": "The date and time when this object was last updated.", "readOnly": true }, - "name": { + "updatedBy": { "type": "string", - "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000", + "description": "The identity of the principal or process that updated the object.", "readOnly": true }, - "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "$ref": "#/definitions/ManagementGroupProperties" + "parent": { + "$ref": "#/definitions/CreateParentGroupInfo", + "description": "(Optional) The ID of the parent management group used during creation." } } }, - "ManagementGroupProperties": { - "description": "The generic properties of a management group.", + "CreateManagementGroupProperties": { "type": "object", + "description": "The generic properties of a management group used during creation.", "properties": { "tenantId": { "type": "string", - "description": "The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000" + "description": "The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000", + "readOnly": true }, "displayName": { "type": "string", - "description": "The friendly name of the management group." + "description": "The friendly name of the management group. If no value is passed then this field will be set to the groupId." }, "details": { - "title": "Details", - "$ref": "#/definitions/ManagementGroupDetails" + "$ref": "#/definitions/CreateManagementGroupDetails", + "description": "The details of a management group used during creation." }, "children": { - "description": "The list of children.", - "x-nullable": true, "type": "array", - "items": { - "$ref": "#/definitions/ManagementGroupChildInfo" - } - } - } - }, - "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" - }, - "path": { - "description": "The path from the root to the current group.", - "x-nullable": true, - "type": "array", - "items": { - "$ref": "#/definitions/ManagementGroupPathElement" - }, - "x-ms-identifiers": [ - "name" - ] - }, - "managementGroupAncestors": { - "description": "The ancestors of the management group.", - "x-nullable": true, - "type": "array", - "items": { - "type": "string" - } - }, - "managementGroupAncestorsChain": { - "description": "The ancestors of the management group displayed in reversed order, from immediate parent to the root.", - "x-nullable": true, - "type": "array", - "items": { - "$ref": "#/definitions/ManagementGroupPathElement" - }, - "x-ms-identifiers": [ - "name" - ] - } - } - }, - "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. 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." - }, - "children": { "description": "The list of children.", - "type": "array", "items": { - "$ref": "#/definitions/ManagementGroupChildInfo" - } - } - } - }, - "ManagementGroupPathElement": { - "description": "A path element of a management group ancestors.", - "properties": { - "name": { - "type": "string", - "description": "The name of the group." - }, - "displayName": { - "type": "string", - "description": "The friendly name of the group." - } - } - }, - "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." - } - } - }, - "ManagementGroupChildType": { - "type": "string", - "enum": [ - "Microsoft.Management/managementGroups", - "/subscriptions" - ], - "x-ms-enum": { - "name": "ManagementGroupChildType", - "modelAsString": false, - "values": [ - { - "value": "Microsoft.Management/managementGroups" + "$ref": "#/definitions/CreateManagementGroupChildInfo" }, - { - "value": "/subscriptions" - } - ] - }, - "description": "The type of child resource." - }, - "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, 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/ManagementGroupInfoProperties" } } }, - "AzureAsyncOperationResults": { - "description": "The results of Azure-AsyncOperation.", + "CreateManagementGroupRequest": { + "type": "object", + "description": "Management group creation parameters.", "properties": { "id": { "type": "string", @@ -1410,55 +1368,19 @@ }, "name": { "type": "string", - "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000", - "readOnly": true - }, - "status": { - "type": "string", - "description": "The current status of the asynchronous operation performed . For example, Running, Succeeded, Failed", - "readOnly": true - }, - "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "$ref": "#/definitions/ManagementGroupInfoProperties" - } - } - }, - "HierarchySettings": { - "description": "Settings defined at the Management Group scope.", - "x-ms-azure-resource": true, - "properties": { - "id": { - "type": "string", - "description": "The fully qualified ID for the settings object. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default.", - "readOnly": true - }, - "type": { - "type": "string", - "description": "The type of the resource. For example, Microsoft.Management/managementGroups/settings.", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the object. In this case, default.", - "readOnly": true + "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000" }, "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "$ref": "#/definitions/HierarchySettingsProperties" + "$ref": "#/definitions/CreateManagementGroupProperties", + "description": "The generic properties of a management group used during creation.", + "x-ms-client-flatten": true } } }, - "HierarchySettingsProperties": { - "description": "The generic properties of hierarchy settings.", + "CreateOrUpdateSettingsProperties": { "type": "object", + "description": "The properties of the request to create or update Management Group settings", "properties": { - "tenantId": { - "type": "string", - "description": "The AAD Tenant ID associated with the hierarchy settings. For example, 00000000-0000-0000-0000-000000000000" - }, "requireAuthorizationForGroupCreation": { "type": "boolean", "description": "Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will require Microsoft.Management/managementGroups/write action on the root Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating new Management Groups, unless they are given access." @@ -1469,106 +1391,50 @@ } } }, - "HierarchySettingsList": { - "description": "Lists all hierarchy settings.", - "properties": { - "value": { - "description": "The list of hierarchy settings.", - "type": "array", - "items": { - "$ref": "#/definitions/HierarchySettingsInfo" - } - }, - "@nextLink": { - "description": "The URL to use for getting the next set of results.", - "type": "string", - "readOnly": true - } - } - }, - "HierarchySettingsInfo": { - "description": "The hierarchy settings resource.", - "properties": { - "id": { - "type": "string", - "description": "The fully qualified ID for the settings object. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default.", - "readOnly": true - }, - "type": { - "type": "string", - "description": "The type of the resource. For example, Microsoft.Management/managementGroups/settings.", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the object. In this case, default.", - "readOnly": true - }, - "properties": { - "x-ms-client-flatten": true, - "title": "Properties", - "$ref": "#/definitions/HierarchySettingsProperties" - } - } - }, - "CreateOrUpdateSettingsRequest": { - "description": "Parameters for creating or updating Management Group settings", - "type": "object", - "x-ms-azure-resource": true, - "properties": { - "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "$ref": "#/definitions/CreateOrUpdateSettingsProperties" - } - } - }, - "CreateOrUpdateSettingsProperties": { - "description": "The properties of the request to create or update Management Group settings", - "type": "object", - "x-ms-azure-resource": true, - "properties": { - "requireAuthorizationForGroupCreation": { - "type": "boolean", - "description": "Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will require Microsoft.Management/managementGroups/write action on the root Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating new Management Groups, unless they are given access." - }, - "defaultManagementGroup": { - "type": "string", - "description": "Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup" + "CreateOrUpdateSettingsRequest": { + "type": "object", + "description": "Parameters for creating or updating Management Group settings", + "properties": { + "properties": { + "$ref": "#/definitions/CreateOrUpdateSettingsProperties", + "description": "The properties of the request to create or update Management Group settings", + "x-ms-client-flatten": true } } }, - "DescendantListResult": { - "description": "Describes the result of the request to view descendants.", + "CreateParentGroupInfo": { + "type": "object", + "description": "(Optional) The ID of the parent management group used during creation.", "properties": { - "value": { - "description": "The list of descendants.", - "type": "array", - "items": { - "$ref": "#/definitions/DescendantInfo" - } + "id": { + "type": "string", + "description": "The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" }, - "nextLink": { - "description": "The URL to use for getting the next set of results.", + "name": { + "type": "string", + "description": "The name of the parent management group", + "readOnly": true + }, + "displayName": { "type": "string", + "description": "The friendly name of the parent management group.", "readOnly": true } } }, "DescendantInfo": { + "type": "object", "description": "The descendant.", "properties": { "id": { "type": "string", "description": "The fully qualified ID for the descendant. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 or /subscriptions/0000000-0000-0000-0000-000000000000", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "type": { "type": "string", "description": "The type of the resource. For example, Microsoft.Management/managementGroups or /subscriptions", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "name": { "type": "string", @@ -1576,74 +1442,71 @@ "readOnly": true }, "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "x-nullable": true, - "$ref": "#/definitions/DescendantInfoProperties" + "$ref": "#/definitions/DescendantInfoProperties", + "description": "The generic properties of an descendant.", + "x-ms-client-flatten": true } } }, "DescendantInfoProperties": { - "description": "The generic properties of an descendant.", "type": "object", + "description": "The generic properties of an descendant.", "properties": { "displayName": { "type": "string", - "description": "The friendly name of the management group.", - "x-nullable": true + "description": "The friendly name of the management group." }, "parent": { - "title": "Parent", "$ref": "#/definitions/DescendantParentGroupInfo", + "description": "The ID of the parent management group.", "x-nullable": true } } }, - "DescendantParentGroupInfo": { - "description": "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" - } - } - }, - "EntityListResult": { - "description": "Describes the result of the request to view entities.", + "DescendantListResult": { + "type": "object", + "description": "Paged collection of DescendantInfo items", "properties": { "value": { - "description": "The list of entities.", "type": "array", + "description": "The DescendantInfo items on this page", "items": { - "$ref": "#/definitions/EntityInfo" + "$ref": "#/definitions/DescendantInfo" } }, - "count": { - "description": "Total count of records that match the filter", - "type": "integer", - "readOnly": true - }, "nextLink": { - "description": "The URL to use for getting the next set of results.", "type": "string", - "readOnly": true + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "DescendantParentGroupInfo": { + "type": "object", + "description": "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" } } }, "EntityInfo": { + "type": "object", "description": "The entity.", "properties": { "id": { "type": "string", "description": "The fully qualified ID for the entity. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "type": { "type": "string", "description": "The type of the resource. For example, Microsoft.Management/managementGroups", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "name": { "type": "string", @@ -1651,63 +1514,54 @@ "readOnly": true }, "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "x-nullable": true, - "$ref": "#/definitions/EntityInfoProperties" + "$ref": "#/definitions/EntityInfoProperties", + "description": "The generic properties of an entity.", + "x-ms-client-flatten": true } } }, "EntityInfoProperties": { - "description": "The generic properties of an entity.", "type": "object", + "description": "The generic properties of an entity.", "properties": { "tenantId": { "type": "string", - "description": "The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000", - "x-nullable": true + "description": "The AAD Tenant ID associated with the entity. For example, 00000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", - "description": "The friendly name of the management group.", - "x-nullable": true + "description": "The friendly name of the management group." }, "parent": { - "title": "Parent", "$ref": "#/definitions/EntityParentGroupInfo", - "x-nullable": true + "description": "(Optional) The ID of the parent management group." }, "permissions": { - "title": "Permissions", - "x-nullable": true, - "$ref": "#/definitions/Permissions" + "$ref": "#/definitions/Permissions", + "description": "The users specific permissions to this item." }, "inheritedPermissions": { - "title": "Inherited Permissions", - "x-nullable": true, - "$ref": "#/definitions/Permissions" + "$ref": "#/definitions/Permissions", + "description": "The users specific permissions to this item." }, "numberOfDescendants": { - "title": "Number of Descendants", "type": "integer", - "x-nullable": true + "format": "int32", + "description": "Number of Descendants" }, "numberOfChildren": { - "title": "Number of Children", - "description": "Number of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group.", "type": "integer", - "x-nullable": true + "format": "int32", + "description": "Number of children is the number of Groups and Subscriptions that are exactly one level underneath the current Group." }, "numberOfChildGroups": { - "title": "Number of Child Groups", - "description": "Number of children is the number of Groups that are exactly one level underneath the current Group.", "type": "integer", - "x-nullable": true + "format": "int32", + "description": "Number of children is the number of Groups that are exactly one level underneath the current Group." }, "parentDisplayNameChain": { "type": "array", "description": "The parent display name chain from the root group to the immediate parent", - "x-nullable": true, "items": { "type": "string" } @@ -1715,14 +1569,35 @@ "parentNameChain": { "type": "array", "description": "The parent name chain from the root group to the immediate parent", - "x-nullable": true, "items": { "type": "string" } } } }, + "EntityListResult": { + "type": "object", + "description": "Paged collection of EntityInfo items", + "properties": { + "value": { + "type": "array", + "description": "The EntityInfo items on this page", + "items": { + "$ref": "#/definitions/EntityInfo" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, "EntityParentGroupInfo": { + "type": "object", "description": "(Optional) The ID of the parent management group.", "properties": { "id": { @@ -1731,74 +1606,229 @@ } } }, - "EntityHierarchyItem": { - "description": "The management group details for the hierarchy view.", - "x-ms-azure-resource": true, + "HierarchySettings": { + "type": "object", + "description": "Settings defined at the Management Group scope.", + "properties": { + "properties": { + "$ref": "#/definitions/HierarchySettingsProperties", + "description": "The generic properties of hierarchy settings.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "HierarchySettingsInfo": { + "type": "object", + "description": "The hierarchy settings 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", + "description": "The fully qualified ID for the settings object. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default.", "readOnly": true }, "type": { "type": "string", - "description": "The type of the resource. For example, Microsoft.Management/managementGroups", + "description": "The type of the resource. For example, Microsoft.Management/managementGroups/settings.", "readOnly": true }, "name": { "type": "string", - "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000", + "description": "The name of the object. In this case, default.", "readOnly": true }, "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "$ref": "#/definitions/EntityHierarchyItemProperties" + "$ref": "#/definitions/HierarchySettingsProperties", + "description": "The generic properties of hierarchy settings.", + "x-ms-client-flatten": true } } }, - "EntityHierarchyItemProperties": { - "description": "The generic properties of a management group.", + "HierarchySettingsList": { "type": "object", + "description": "Lists all hierarchy settings.", "properties": { - "displayName": { + "value": { + "type": "array", + "description": "The list of hierarchy settings.", + "items": { + "$ref": "#/definitions/HierarchySettingsInfo" + } + }, + "@nextLink": { "type": "string", - "description": "The friendly name of the management group." + "description": "The URL to use for getting the next set of results.", + "readOnly": true, + "x-ms-client-name": "NextLink" + } + } + }, + "HierarchySettingsProperties": { + "type": "object", + "description": "The generic properties of hierarchy settings.", + "properties": { + "tenantId": { + "type": "string", + "description": "The AAD Tenant ID associated with the hierarchy settings. For example, 00000000-0000-0000-0000-000000000000" }, - "permissions": { - "title": "Permissions", - "$ref": "#/definitions/Permissions" + "requireAuthorizationForGroupCreation": { + "type": "boolean", + "description": "Indicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will require Microsoft.Management/managementGroups/write action on the root Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating new Management Groups, unless they are given access." + }, + "defaultManagementGroup": { + "type": "string", + "description": "Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup" + } + } + }, + "ListSubscriptionUnderManagementGroup": { + "type": "object", + "description": "The details of all subscriptions under management group.", + "properties": { + "value": { + "type": "array", + "description": "The SubscriptionUnderManagementGroup items on this page", + "items": { + "$ref": "#/definitions/SubscriptionUnderManagementGroup" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ManagementGroup": { + "type": "object", + "description": "The management group details.", + "properties": { + "properties": { + "$ref": "#/definitions/ManagementGroupProperties", + "description": "The generic properties of a management group.", + "x-ms-client-flatten": true + } + }, + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] + }, + "ManagementGroupChildInfo": { + "type": "object", + "description": "The child information of a management group.", + "properties": { + "type": { + "$ref": "#/definitions/ManagementGroupChildType", + "description": "The fully qualified resource type which includes provider namespace (e.g. 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." }, "children": { "type": "array", "description": "The list of children.", - "x-nullable": true, "items": { - "$ref": "#/definitions/EntityHierarchyItem" + "$ref": "#/definitions/ManagementGroupChildInfo" + } + } + } + }, + "ManagementGroupChildType": { + "type": "string", + "description": "The type of child resource.", + "enum": [ + "Microsoft.Management/managementGroups", + "/subscriptions" + ], + "x-ms-enum": { + "name": "ManagementGroupChildType", + "modelAsString": false, + "values": [ + { + "name": "Microsoft.Management/managementGroups", + "value": "Microsoft.Management/managementGroups", + "description": "Microsoft.Management/managementGroups" + }, + { + "name": "/subscriptions", + "value": "/subscriptions", + "description": "/subscriptions" + } + ] + } + }, + "ManagementGroupDetails": { + "type": "object", + "description": "The details of a management group.", + "properties": { + "version": { + "type": "integer", + "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": { + "$ref": "#/definitions/ParentGroupInfo", + "description": "(Optional) The ID of the parent management group." + }, + "path": { + "type": "array", + "description": "The path from the root to the current group.", + "items": { + "$ref": "#/definitions/ManagementGroupPathElement" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "managementGroupAncestors": { + "type": "array", + "description": "The ancestors of the management group.", + "items": { + "type": "string" } - } - } - }, - "PatchManagementGroupRequest": { - "description": "Management group patch parameters.", - "type": "object", - "properties": { - "displayName": { - "type": "string", - "description": "The friendly name of the management group.", - "x-nullable": true }, - "parentGroupId": { - "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 + "managementGroupAncestorsChain": { + "type": "array", + "description": "The ancestors of the management group displayed in reversed order, from immediate parent to the root.", + "items": { + "$ref": "#/definitions/ManagementGroupPathElement" + }, + "x-ms-identifiers": [ + "name" + ] } } }, - "CreateManagementGroupRequest": { - "description": "Management group creation parameters.", + "ManagementGroupInfo": { "type": "object", - "x-ms-azure-resource": true, + "description": "The management group resource.", "properties": { "id": { "type": "string", @@ -1807,112 +1837,96 @@ }, "type": { "type": "string", - "description": "The type of the resource. For example, Microsoft.Management/managementGroups", + "description": "The type of the resource. For example, Microsoft.Management/managementGroups", "readOnly": true }, "name": { "type": "string", - "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000" + "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/CreateManagementGroupProperties" + "$ref": "#/definitions/ManagementGroupInfoProperties", + "description": "The generic properties of a management group.", + "x-ms-client-flatten": true } } }, - "CreateManagementGroupProperties": { - "description": "The generic properties of a management group used during creation.", + "ManagementGroupInfoProperties": { "type": "object", + "description": "The generic properties of a management group.", "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 - }, - "details": { - "title": "Details", - "$ref": "#/definitions/CreateManagementGroupDetails" - }, - "children": { - "description": "The list of children.", - "readOnly": true, - "x-nullable": true, + "description": "The friendly name of the management group." + } + } + }, + "ManagementGroupListResult": { + "type": "object", + "description": "Describes the result of the request to list management groups.", + "properties": { + "value": { "type": "array", + "description": "The list of management groups.", "items": { - "$ref": "#/definitions/CreateManagementGroupChildInfo" + "$ref": "#/definitions/ManagementGroupInfo" } + }, + "@nextLink": { + "type": "string", + "description": "The URL to use for getting the next set of results.", + "readOnly": true, + "x-ms-client-name": "NextLink" } } }, - "CreateManagementGroupDetails": { - "description": "The details of a management group used during creation.", + "ManagementGroupPathElement": { "type": "object", + "description": "A path element of a management group ancestors.", "properties": { - "version": { - "type": "number", - "readOnly": true, - "format": "int32", - "description": "The version number of the object." - }, - "updatedTime": { + "name": { "type": "string", - "readOnly": true, - "format": "date-time", - "description": "The date and time when this object was last updated." + "description": "The name of the group." }, - "updatedBy": { + "displayName": { "type": "string", - "readOnly": true, - "description": "The identity of the principal or process that updated the object." - }, - "parent": { - "title": "Parent", - "$ref": "#/definitions/CreateParentGroupInfo" + "description": "The friendly name of the group." } } }, - "CreateManagementGroupChildInfo": { - "description": "The child information of a management group used during creation.", + "ManagementGroupProperties": { + "type": "object", + "description": "The generic properties of a management group.", "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. 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": { + "tenantId": { "type": "string", - "readOnly": true, - "description": "The name of the child entity." + "description": "The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000" }, "displayName": { "type": "string", - "readOnly": true, - "description": "The friendly name of the child resource." + "description": "The friendly name of the management group." + }, + "details": { + "$ref": "#/definitions/ManagementGroupDetails", + "description": "The details of a management group." }, "children": { - "description": "The list of children.", - "readOnly": true, "type": "array", + "description": "The list of children.", "items": { - "$ref": "#/definitions/CreateManagementGroupChildInfo" + "$ref": "#/definitions/ManagementGroupChildInfo" } } } }, - "CreateParentGroupInfo": { - "description": "(Optional) The ID of the parent management group used during creation.", + "ParentGroupInfo": { + "type": "object", + "description": "(Optional) The ID of the parent management group.", "properties": { "id": { "type": "string", @@ -1920,18 +1934,31 @@ }, "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." } } }, + "PatchManagementGroupRequest": { + "type": "object", + "description": "Management group patch parameters.", + "properties": { + "displayName": { + "type": "string", + "description": "The friendly name of the management group." + }, + "parentGroupId": { + "type": "string", + "description": "(Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" + } + } + }, "Permissions": { "type": "string", + "description": "The users specific permissions to this item.", "enum": [ "noaccess", "view", @@ -1943,237 +1970,154 @@ "modelAsString": false, "values": [ { - "value": "noaccess" + "name": "noaccess", + "value": "noaccess", + "description": "noaccess" }, { - "value": "view" + "name": "view", + "value": "view", + "description": "view" }, { - "value": "edit" + "name": "edit", + "value": "edit", + "description": "edit" }, { - "value": "delete" + "name": "delete", + "value": "delete", + "description": "delete" } ] - }, - "description": "The users specific permissions to this item." - }, - "CheckNameAvailabilityRequest": { - "description": "Management group name availability check parameters.", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "the name to check for availability" - }, - "type": { - "type": "string", - "enum": [ - "Microsoft.Management/managementGroups" - ], - "x-ms-enum": { - "name": "Type", - "modelAsString": false, - "values": [ - { - "value": "Microsoft.Management/managementGroups" - } - ] - }, - "description": "fully qualified resource type which includes provider namespace" - } } - } - }, - "parameters": { - "GroupIdParameter": { - "name": "groupId", - "in": "path", - "required": true, - "type": "string", - "description": "Management Group ID.", - "x-ms-parameter-location": "method" - }, - "SubscriptionIdParameter": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "Subscription ID.", - "x-ms-parameter-location": "method" - }, - "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." }, - "ExpandParameter": { - "name": "$expand", - "in": "query", - "required": false, + "Reason": { "type": "string", + "description": "Required if nameAvailable == false. Invalid indicates the name provided does not match the resource provider's naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.", "enum": [ - "children", - "path", - "ancestors" + "Invalid", + "AlreadyExists" ], "x-ms-enum": { - "name": "ManagementGroupExpandType", - "modelAsString": true - }, - "x-ms-parameter-location": "method", - "description": "The $expand=children query string parameter allows clients to request inclusion of children in the response payload. $expand=path includes the path from the root group to the current group. $expand=ancestors includes the ancestor Ids of the current group." - }, - "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." - }, - "CreateManagementGroupRequestParameter": { - "name": "createManagementGroupRequest", - "in": "body", - "required": true, - "description": "Management group creation parameters.", - "schema": { - "$ref": "#/definitions/CreateManagementGroupRequest" - }, - "x-ms-parameter-location": "method" - }, - "PatchGroupRequestParameter": { - "name": "patchGroupRequest", - "in": "body", - "required": true, - "description": "Management group patch parameters.", - "schema": { - "$ref": "#/definitions/PatchManagementGroupRequest" - }, - "x-ms-parameter-location": "method" - }, - "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" - }, - "EntityFilterParameter": { - "name": "$filter", - "in": "query", - "required": false, - "description": "The filter parameter allows you to filter on the the name or display name fields. You can check for equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName, '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case insensitively.", - "type": "string", - "x-ms-parameter-location": "method" - }, - "SelectParameter": { - "name": "$select", - "in": "query", - "required": false, - "description": "This parameter specifies the fields to include in the response. Can include any combination of Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the $select parameter can override select in $skipToken.", - "type": "string", - "x-ms-parameter-location": "method" + "name": "Reason", + "modelAsString": false, + "values": [ + { + "name": "Invalid", + "value": "Invalid", + "description": "Invalid" + }, + { + "name": "AlreadyExists", + "value": "AlreadyExists", + "description": "AlreadyExists" + } + ] + } }, - "SearchParameter": { - "name": "$search", - "in": "query", - "required": false, + "Status": { "type": "string", + "description": "The status of the Tenant Backfill", "enum": [ - "AllowedParents", - "AllowedChildren", - "ParentAndFirstLevelChildren", - "ParentOnly", - "ChildrenOnly" + "NotStarted", + "NotStartedButGroupsExist", + "Started", + "Failed", + "Cancelled", + "Completed" ], "x-ms-enum": { - "name": "EntitySearchType", - "modelAsString": true - }, - "x-ms-parameter-location": "method", - "description": "The $search parameter is used in conjunction with the $filter parameter to return three different outputs depending on the parameter passed in. \nWith $search=AllowedParents the API will return the entity info of all groups that the requested entity will be able to reparent to as determined by the user's permissions.\nWith $search=AllowedChildren the API will return the entity info of all entities that can be added as children of the requested entity.\nWith $search=ParentAndFirstLevelChildren the API will return the parent and first level of children that the user has either direct access to or indirect access via one of their descendants.\nWith $search=ParentOnly the API will return only the group if the user has access to at least one of the descendants of the group.\nWith $search=ChildrenOnly the API will return only the first level of children of the group entity info specified in $filter. The user must have direct access to the children entities or one of it's descendants for it to show up in the results." - }, - "GroupNameParameter": { - "name": "groupName", - "in": "query", - "required": false, - "description": "A filter which allows the get entities call to focus on a particular group (i.e. \"$filter=name eq 'groupName'\")", - "type": "string", - "x-ms-parameter-location": "method" - }, - "CreateOrUpdateManagementGroupSettingsRequestParameter": { - "name": "CreateTenantSettingsRequest", - "in": "body", - "required": true, - "description": "Tenant level settings request parameter.", - "schema": { - "$ref": "#/definitions/CreateOrUpdateSettingsRequest" - }, - "x-ms-parameter-location": "method" + "name": "Status", + "modelAsString": false, + "values": [ + { + "name": "NotStarted", + "value": "NotStarted", + "description": "NotStarted" + }, + { + "name": "NotStartedButGroupsExist", + "value": "NotStartedButGroupsExist", + "description": "NotStartedButGroupsExist" + }, + { + "name": "Started", + "value": "Started", + "description": "Started" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Failed" + }, + { + "name": "Cancelled", + "value": "Cancelled", + "description": "Cancelled" + }, + { + "name": "Completed", + "value": "Completed", + "description": "Completed" + } + ] + } }, - "CheckNameAvailabilityParameter": { - "name": "checkNameAvailabilityRequest", - "in": "body", - "required": true, - "description": "Management group name availability check parameters.", - "schema": { - "$ref": "#/definitions/CheckNameAvailabilityRequest" + "SubscriptionUnderManagementGroup": { + "type": "object", + "description": "The details of subscription under management group.", + "properties": { + "properties": { + "$ref": "#/definitions/SubscriptionUnderManagementGroupProperties", + "description": "The generic properties of subscription under a management group.", + "x-ms-client-flatten": true + } }, - "x-ms-parameter-location": "method" - }, - "SkipParameter": { - "name": "$skip", - "in": "query", - "required": false, - "type": "integer", - "description": "Number of entities to skip over when retrieving results. Passing this in will override $skipToken.", - "x-ms-parameter-location": "method" - }, - "TopParameter": { - "name": "$top", - "in": "query", - "required": false, - "type": "integer", - "description": "Number of elements to return when retrieving results. Passing this in will override $skipToken.", - "x-ms-parameter-location": "method" - }, - "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": "method" + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ] }, - "CacheControlHeader": { - "name": "Cache-Control", - "in": "header", - "default": "no-cache", - "description": "Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.", - "type": "string", - "x-ms-parameter-location": "method" + "SubscriptionUnderManagementGroupProperties": { + "type": "object", + "description": "The generic properties of subscription under a management group.", + "properties": { + "tenant": { + "type": "string", + "description": "The AAD Tenant ID associated with the subscription. For example, 00000000-0000-0000-0000-000000000000" + }, + "displayName": { + "type": "string", + "description": "The friendly name of the subscription." + }, + "parent": { + "$ref": "#/definitions/DescendantParentGroupInfo", + "description": "The ID of the parent management group." + }, + "state": { + "type": "string", + "description": "The state of the subscription." + } + } }, - "EntityViewParameter": { - "name": "$view", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "FullHierarchy", - "GroupsOnly", - "SubscriptionsOnly", - "Audit" - ], - "x-ms-enum": { - "name": "EntityViewParameterType", - "modelAsString": true - }, - "x-ms-parameter-location": "method", - "description": "The view parameter allows clients to filter the type of data that is returned by the getEntities call." + "TenantBackfillStatusResult": { + "type": "object", + "description": "The tenant backfill status", + "properties": { + "tenantId": { + "type": "string", + "description": "The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/Status", + "description": "The status of the Tenant Backfill", + "readOnly": true + } + } } - } + }, + "parameters": {} }