From 50ef23a25174b78726465c36d07554c15157e025 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Fri, 9 Feb 2018 16:40:45 -0800 Subject: [PATCH 01/11] Move ManagementGroups out of Resources to a separate folder --- .../examples/GetGroups.json | 0 .../examples/GetManagementGroup.json | 0 .../GetManagementGroupWithExpand.json | 0 ...etManagementGroupWithExpandAndRecurse.json | 0 .../2017-08-31-preview/management.json | 0 .../addManagementGroupSubscription.json | 10 + .../createOrUpdateManagementGroup.json | 34 + .../examples/deleteManagementGroup.json | 0 .../examples/getManagementGroup.json | 30 + .../getManagementGroupSubscription.json | 0 .../getManagementGroupWithExpand.json | 47 ++ ...etManagementGroupWithExpandAndRecurse.json | 74 ++ .../examples/getOperations.json | 0 .../examples/listManagementGroups.json | 0 .../removeManagementGroupSubscription.json | 10 + .../examples/updateManagementGroup.json | 34 + .../2017-11-01-preview/management.json | 699 ++++++++++++++++++ .../AddManagementGroupSubscription.json | 0 .../CheckManagementGroupNameAvailability.json | 0 .../examples/DeleteManagementGroup.json | 0 .../examples/EntitiesGetHierarchy.json | 0 .../examples/GetEntities.json | 0 .../examples/GetManagementGroup.json | 0 .../GetManagementGroupWithExpand.json | 0 ...etManagementGroupWithExpandAndRecurse.json | 0 .../examples/GetOperationResult.json | 0 .../examples/ListManagementGroups.json | 0 .../examples/PatchManagementGroup.json | 0 .../examples/PutManagementGroup.json | 0 .../RemoveManagementGroupSubscription.json | 0 .../2018-01-01-preview/management.json | 0 specification/managementgroups/readme.md | 172 +++++ 32 files changed, 1110 insertions(+) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-08-31-preview/management.json (100%) create mode 100644 specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json create mode 100644 specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json (100%) create mode 100644 specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json (100%) create mode 100644 specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json create mode 100644 specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json (100%) create mode 100644 specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json create mode 100644 specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json create mode 100644 specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/management.json rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json (100%) rename specification/{resources/resource-manager => managementgroups}/Microsoft.Management/preview/2018-01-01-preview/management.json (100%) create mode 100644 specification/managementgroups/readme.md diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json b/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json rename to specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json rename to specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json b/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json rename to specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json b/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json rename to specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/management.json b/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/management.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-08-31-preview/management.json rename to specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/management.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json new file mode 100644 index 000000000000..67d4bd31de9f --- /dev/null +++ b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2017-11-01-preview", + "groupId": "00000000-0000-0000-0000-000000000001", + "subscriptionId": "00000000-0000-0000-0000-000000000011" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json new file mode 100644 index 000000000000..04d978153597 --- /dev/null +++ b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2017-11-01-preview", + "groupId": "00000000-0000-0000-0000-000000000002", + "createManagementGroupRequest": { + "properties ": { + "displayName": "Group Name 2", + "parentGroupId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000002", + "type": "/providers/Microsoft.Management/managementGroups", + "name": "00000000-0000-0000-0000-000000000002", + "properties": { + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "Group Name 2", + "details": { + "version": 1, + "updatedTime": "2017-01-01T00:00:00.00Z", + "updatedBy": "Test", + "parent": { + "parentId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001", + "displayName": "Group Name 1" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json rename to specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json new file mode 100644 index 000000000000..8f9f6d275303 --- /dev/null +++ b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2018-01-01-preview", + "groupId": "20000000-0001-0000-0000-000000000000", + "Cache-Control": "no-cache" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", + "type": "/providers/Microsoft.Management/managementGroups", + "name": "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": "16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b", + "parent": { + "parentId": "/providers/Microsoft.Management/managementGroups/RootGroup", + "displayName": "RootGroup" + } + }, + "children": null + } + } + } + } +} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json rename to specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json new file mode 100644 index 000000000000..92208cbaa967 --- /dev/null +++ b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2017-11-01-preview", + "groupId": "00000000-0000-0000-0000-000000000001", + "$expand": "children", + "Cache-Control": "no-cache" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001", + "type": "/providers/Microsoft.Management/managementGroups", + "name": "00000000-0000-0000-0000-000000000001", + "properties": { + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "Group Name 1", + "details": { + "version": 1, + "updatedTime": "2017-01-01T00:00:00Z", + "updatedBy": "Test", + "parent": { + "parentId": "/providers/Microsoft.Management/managementGroups/RootGroup", + "displayName": "RootGroup" + } + }, + "children": [ + { + "childType": "ManagementGroup", + "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000002", + "displayName": "Group Name 2" + }, + { + "childType": "ManagementGroup", + "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000003", + "displayName": "Group Name 3" + }, + { + "childType": "Subscription", + "childId": "/subscriptions/00000000-0000-0000-0000-000000000011", + "displayName": "Subscription Name 1" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json new file mode 100644 index 000000000000..af11b4d0169f --- /dev/null +++ b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2017-11-01-preview", + "groupId": "00000000-0000-0000-0000-000000000001", + "$expand": "children", + "$recurse": true, + "Cache-Control": "no-cache" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001", + "type": "/providers/Microsoft.Management/managementGroups", + "name": "00000000-0000-0000-0000-000000000001", + "properties": { + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "Group Name 1", + "details": { + "version": 1, + "updatedTime": "2017-01-01T00:00:00Z", + "updatedBy": "Test", + "parent": { + "parentId": "/providers/Microsoft.Management/managementGroups/RootGroup", + "displayName": "RootGroup" + } + }, + "children": [ + { + "childType": "ManagementGroup", + "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000002", + "displayName": "Group Name 2", + "children": [ + { + "childType": "ManagementGroup", + "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000004", + "displayName": "Group Name 4", + "children": [ + { + "childType": "Subscription", + "childId": "/subscriptions/00000000-0000-0000-0000-000000000012", + "displayName": "Subscription Name 2" + }, + { + "childType": "Subscription", + "childId": "/subscriptions/00000000-0000-0000-0000-000000000013", + "displayName": "Subscription Name 3" + } + ] + } + ] + }, + { + "childType": "ManagementGroup", + "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000003", + "displayName": "Group Name 3", + "children": [ + { + "childType": "Subscription", + "childId": "/subscriptions/00000000-0000-0000-0000-000000000014", + "displayName": "Subscription Name 4" + } + ] + }, + { + "childType": "Subscription", + "childId": "/subscriptions/00000000-0000-0000-0000-000000000011", + "displayName": "Subscription Name 1" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json rename to specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json rename to specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json new file mode 100644 index 000000000000..67d4bd31de9f --- /dev/null +++ b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2017-11-01-preview", + "groupId": "00000000-0000-0000-0000-000000000001", + "subscriptionId": "00000000-0000-0000-0000-000000000011" + }, + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json new file mode 100644 index 000000000000..7e815ef190a6 --- /dev/null +++ b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2017-11-01-preview", + "groupId": "00000000-0000-0000-0000-000000000002", + "createManagementGroupRequest": { + "properties ": { + "displayName": "Group Name 2", + "parentGroupId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000002", + "type": "/providers/Microsoft.Management/managementGroups", + "name": "00000000-0000-0000-0000-000000000002", + "properties": { + "tenantId": "00000000-0000-0000-0000-000000000000", + "displayName": "Group Name 2", + "details": { + "version": 1, + "updatedTime": "2017-01-01T00:00:00.00Z", + "updatedBy": "Test", + "parent": { + "parentId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001", + "displayName": "Group Name 1" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/management.json b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/management.json new file mode 100644 index 000000000000..19eb90ccb5f7 --- /dev/null +++ b/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/management.json @@ -0,0 +1,699 @@ +{ + "swagger": "2.0", + "host": "management.azure.com", + "info": { + "version": "2017-11-01-preview", + "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" + }, + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "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", + "description": "Management operations supported by the Microsoft.Management resource provider.\n" + } + ], + "paths": { + "/providers/Microsoft.Management/managementGroups": { + "get": { + "tags": [ + "ManagementGroups" + ], + "operationId": "ManagementGroups_List", + "description": "List management groups for the authenticated user.\n", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CacheControlHeader" + }, + { + "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" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ManagementGroupListResult" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetManagementGroups": { + "$ref": "./examples/listManagementGroups.json" + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{groupId}": { + "get": { + "tags": [ + "ManagementGroups" + ], + "operationId": "ManagementGroups_Get", + "description": "Get the details of the management group.\n", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ExpandParameter" + }, + { + "$ref": "#/parameters/RecurseParameter" + }, + { + "$ref": "#/parameters/CacheControlHeader" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ManagementGroup" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetManagementGroup": { + "$ref": "./examples/getManagementGroup.json" + }, + "GetManagementGroupWithExpand": { + "$ref": "./examples/getManagementGroupWithExpand.json" + }, + "GetManagementGroupsWithExpandAndRecurse": { + "$ref": "./examples/getManagementGroupWithExpandAndRecurse.json" + } + } + }, + "put": { + "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", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CreateManagementGroupRequestParameter" + }, + { + "$ref": "#/parameters/CacheControlHeader" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ManagementGroup" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PutManagementGroup": { + "$ref": "./examples/createOrUpdateManagementGroup.json" + } + } + }, + "patch": { + "tags": [ + "ManagementGroups" + ], + "operationId": "ManagementGroups_Update", + "description": "Update a management group.\n", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CreateManagementGroupRequestParameter" + }, + { + "$ref": "#/parameters/CacheControlHeader" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ManagementGroup" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PatchManagementGroup": { + "$ref": "./examples/updateManagementGroup.json" + } + } + }, + "delete": { + "tags": [ + "ManagementGroups" + ], + "operationId": "ManagementGroups_Delete", + "description": "Delete management group.\nIf a management group contains child resources, the request will fail.\n", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CacheControlHeader" + } + ], + "responses": { + "200": { + "description": "OK - management group deleted successfully" + }, + "204": { + "description": "NoContent - management group does not exist" + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteManagementGroup": { + "$ref": "./examples/deleteManagementGroup.json" + } + } + } + }, + "/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}": { + "put": { + "tags": [ + "ManagementGroups" + ], + "operationId": "ManagementGroupSubscriptions_Create", + "description": "Associates existing subscription with the management group.\n", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CacheControlHeader" + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "AddSubscriptionToManagementGroup": { + "$ref": "./examples/addManagementGroupSubscription.json" + } + } + }, + "delete": { + "tags": [ + "ManagementGroups" + ], + "operationId": "ManagementGroupSubscriptions_Delete", + "description": "De-associates subscription from the management group.\n", + "parameters": [ + { + "$ref": "#/parameters/GroupIdParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CacheControlHeader" + } + ], + "responses": { + "204": { + "description": "No Content - subscription deleted successfully" + }, + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeleteSubscriptionFromManagementGroup": { + "$ref": "./examples/removeManagementGroupSubscription.json" + } + } + } + }, + "/providers/Microsoft.Management/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available Management REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "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" + } + } + }, + "Operation": { + "description": "Operation supported by the Microsoft.Management resource provider.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "The name of the provider.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "The resource on which the operation is performed.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "The operation that can be performed.", + "type": "string", + "readOnly": true + }, + "description": { + "description": "Operation description.", + "type": "string", + "readOnly": true + } + } + } + } + }, + "OperationListResult": { + "description": "Describes the result of the request to list Microsoft.Management operations.", + "properties": { + "value": { + "description": "List of operations supported by the Microsoft.Management resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "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": { + "type": "string", + "description": "The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", + "readOnly": true + }, + "type": { + "type": "string", + "description": "The type of the resource. For example, /providers/Microsoft.Management/managementGroups", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000", + "readOnly": true + }, + "properties": { + "title": "Properties", + "x-ms-client-flatten": true, + "$ref": "#/definitions/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." + } + } + }, + "ManagementGroup": { + "description": "The management group details.", + "x-ms-azure-resource": true, + "properties": { + "id": { + "type": "string", + "description": "The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", + "readOnly": true + }, + "type": { + "type": "string", + "description": "The type of the resource. For example, /providers/Microsoft.Management/managementGroups", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000", + "readOnly": true + }, + "properties": { + "title": "Properties", + "x-ms-client-flatten": true, + "$ref": "#/definitions/ManagementGroupProperties" + } + } + }, + "ManagementGroupProperties": { + "description": "The generic properties of a management group.", + "type": "object", + "properties": { + "tenantId": { + "type": "string", + "description": "The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000" + }, + "displayName": { + "type": "string", + "description": "The friendly name of the management group." + }, + "details": { + "title": "Details", + "$ref": "#/definitions/ManagementGroupDetails" + }, + "children": { + "description": "The list of children.", + "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" + } + } + }, + "ManagementGroupChildInfo": { + "description": "The child information of a management group.", + "properties": { + "childType": { + "title": "The type of child resource.", + "$ref": "#/definitions/ManagementGroupChildType" + }, + "childId": { + "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" + }, + "displayName": { + "type": "string", + "description": "The friendly name of the child resource." + }, + "children": { + "description": "The list of children.", + "type": "array", + "items": { + "$ref": "#/definitions/ManagementGroupChildInfo" + } + } + } + }, + "ParentGroupInfo": { + "description": "(Optional) The ID of the parent management group.", + "properties": { + "parentId": { + "type": "string", + "description": "The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" + }, + "displayName": { + "type": "string", + "description": "The friendly name of the parent management group." + } + } + }, + "ManagementGroupChildType": { + "type": "string", + "enum": [ + "ManagementGroup", + "Subscription" + ], + "description": "The type of child resource." + }, + "CreateManagementGroupRequest": { + "description": "Management group creation parameters.", + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "The friendly name of the management group." + }, + "parentId": { + "type": "string", + "description": "(Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" + } + } + } + }, + "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 2017-11-01-preview." + }, + "ExpandParameter": { + "name": "$expand", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "children" + ], + "x-ms-parameter-location": "method", + "description": "The $expand=children query string parameter allows clients to request inclusion of children in the response payload." + }, + "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." + }, + "CreateManagementGroupRequestParameter": { + "name": "createManagementGroupRequest", + "in": "body", + "required": true, + "description": "Management group creation parameters.", + "x-ms-parameter-location": "method", + "schema": { + "$ref": "#/definitions/CreateManagementGroupRequest" + } + }, + "CacheControlHeader": { + "name": "Cache-Control", + "in": "header", + "default": "no-cache", + "description": "Indicates that the request shouldn't utilize any caches.", + "x-ms-parameter-location": "method", + "type": "string" + } + } +} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/management.json b/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/management.json similarity index 100% rename from specification/resources/resource-manager/Microsoft.Management/preview/2018-01-01-preview/management.json rename to specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/management.json diff --git a/specification/managementgroups/readme.md b/specification/managementgroups/readme.md new file mode 100644 index 000000000000..2b5b7dada8dc --- /dev/null +++ b/specification/managementgroups/readme.md @@ -0,0 +1,172 @@ +# Management Groups + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Management Groups. + + + +--- +## Getting Started +To build the SDK for Management Groups, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` +--- + +## Configuration + +### Basic Information +These are the global settings for the API. + +``` yaml +openapi-type: arm +tag: package-2018-01 +``` + +### Tag: package-2018-01 +These settings apply only when `--tag=package-2018-01` is specified on the command line. + +``` yaml $(tag) == 'package-2018-11' +input-file: +- Microsoft.Management/preview/2018-01-01-preview/management.json +``` + +### Tag: package-2017-11 +These settings apply only when `--tag=package-2017-11` is specified on the command line. + +``` yaml $(tag) == 'package-2017-11' +input-file: +- Microsoft.Management/preview/2017-11-01-preview/management.json +``` + +### Tag: package-2017-08 +These settings apply only when `--tag=package-2017-08` is specified on the command line. + +``` yaml $(tag) == 'package-2017-08' +input-file: +- Microsoft.Management/preview/2017-08-31-preview/management.json +``` + +--- +# Code Generation + + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +``` yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-libraries-for-java + - repo: azure-sdk-for-go +``` + + +## C# + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +``` yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + namespace: Microsoft.Azure.Management.ManagementGroups + output-folder: $(csharp-sdks-folder)/ManagementGroups/Management.ManagementGroups/Generated + clear-output-folder: true +``` + +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. +Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. + +``` yaml $(python) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.managementgroups + package-name: azure-mgmt-managementgroups + clear-output-folder: true +``` +``` yaml $(python) && $(python-mode) == 'update' +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups/azure/mgmt/managementgroups +``` +``` yaml $(python) && $(python-mode) == 'create' +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups +``` + +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + clear-output-folder: true + namespace: managementgroups +``` + +### Go multi-api + +``` yaml $(go) && $(multiapi) +batch: + - tag: package-2018-01 + - tag: package-2017-11 + - tag: package-2017-08 +``` + +### Tag: package-2018-01 and go + +These settings apply only when `--tag=package-2017-11 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag)=='package-2017-11' && $(go) +output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-11-15/managementgroups +``` + +### Tag: package-2017-11 and go + +These settings apply only when `--tag=package-2017-11 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag)=='package-2017-11' && $(go) +output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-11-15/managementgroups +``` + +### Tag: package-2017-08 and go + +These settings apply only when `--tag=package-2017-11 --go` is specified on the command line. +Please also specify `--go-sdk-folder=`. + +``` yaml $(tag)=='package-2017-08' && $(go) +output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-08-21-preview/managementgroups +``` + +## Java + +These settings apply only when `--java` is specified on the command line. +Please also specify `--azure-libraries-for-java-folder=`. + +``` yaml $(java) +java: + azure-arm: true + fluent: true + namespace: com.microsoft.azure.management.managementgroups + license-header: MICROSOFT_MIT_NO_CODEGEN + payload-flattening-threshold: 1 + output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-managementgroups +``` \ No newline at end of file From 457f7268341380d2fdb39fcdc69ba70b6a9a18e6 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Fri, 9 Feb 2018 16:53:08 -0800 Subject: [PATCH 02/11] Add resource-manager folder --- .../preview/2017-08-31-preview/examples/GetGroups.json | 0 .../preview/2017-08-31-preview/examples/GetManagementGroup.json | 0 .../2017-08-31-preview/examples/GetManagementGroupWithExpand.json | 0 .../examples/GetManagementGroupWithExpandAndRecurse.json | 0 .../preview/2017-08-31-preview/management.json | 0 .../examples/addManagementGroupSubscription.json | 0 .../examples/createOrUpdateManagementGroup.json | 0 .../2017-11-01-preview/examples/deleteManagementGroup.json | 0 .../preview/2017-11-01-preview/examples/getManagementGroup.json | 0 .../examples/getManagementGroupSubscription.json | 0 .../2017-11-01-preview/examples/getManagementGroupWithExpand.json | 0 .../examples/getManagementGroupWithExpandAndRecurse.json | 0 .../preview/2017-11-01-preview/examples/getOperations.json | 0 .../preview/2017-11-01-preview/examples/listManagementGroups.json | 0 .../examples/removeManagementGroupSubscription.json | 0 .../2017-11-01-preview/examples/updateManagementGroup.json | 0 .../preview/2017-11-01-preview/management.json | 0 .../examples/AddManagementGroupSubscription.json | 0 .../examples/CheckManagementGroupNameAvailability.json | 0 .../2018-01-01-preview/examples/DeleteManagementGroup.json | 0 .../preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json | 0 .../preview/2018-01-01-preview/examples/GetEntities.json | 0 .../preview/2018-01-01-preview/examples/GetManagementGroup.json | 0 .../2018-01-01-preview/examples/GetManagementGroupWithExpand.json | 0 .../examples/GetManagementGroupWithExpandAndRecurse.json | 0 .../preview/2018-01-01-preview/examples/GetOperationResult.json | 0 .../preview/2018-01-01-preview/examples/ListManagementGroups.json | 0 .../preview/2018-01-01-preview/examples/PatchManagementGroup.json | 0 .../preview/2018-01-01-preview/examples/PutManagementGroup.json | 0 .../examples/RemoveManagementGroupSubscription.json | 0 .../preview/2018-01-01-preview/management.json | 0 specification/managementgroups/{ => resource-manager}/readme.md | 0 32 files changed, 0 insertions(+), 0 deletions(-) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-08-31-preview/management.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2017-11-01-preview/management.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json (100%) rename specification/managementgroups/{ => resource-manager}/Microsoft.Management/preview/2018-01-01-preview/management.json (100%) rename specification/managementgroups/{ => resource-manager}/readme.md (100%) diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetGroups.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpand.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/examples/GetManagementGroupWithExpandAndRecurse.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/management.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/management.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-08-31-preview/management.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-08-31-preview/management.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/deleteManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupSubscription.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getOperations.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/listManagementGroups.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/management.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/management.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2017-11-01-preview/management.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2017-11-01-preview/management.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/AddManagementGroupSubscription.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/CheckManagementGroupNameAvailability.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/DeleteManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/EntitiesGetHierarchy.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetEntities.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpand.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetManagementGroupWithExpandAndRecurse.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/GetOperationResult.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/ListManagementGroups.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/PatchManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/PutManagementGroup.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/examples/RemoveManagementGroupSubscription.json diff --git a/specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/management.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/management.json similarity index 100% rename from specification/managementgroups/Microsoft.Management/preview/2018-01-01-preview/management.json rename to specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/management.json diff --git a/specification/managementgroups/readme.md b/specification/managementgroups/resource-manager/readme.md similarity index 100% rename from specification/managementgroups/readme.md rename to specification/managementgroups/resource-manager/readme.md From 3fb5b09fbdda1bb0fb4280203479b731aed7c5ca Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Fri, 9 Feb 2018 17:36:18 -0800 Subject: [PATCH 03/11] Add python multiapi --- .../resource-manager/readme.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/specification/managementgroups/resource-manager/readme.md b/specification/managementgroups/resource-manager/readme.md index 2b5b7dada8dc..a9c1a2f93c8a 100644 --- a/specification/managementgroups/resource-manager/readme.md +++ b/specification/managementgroups/resource-manager/readme.md @@ -63,6 +63,8 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-python + after_scripts: + - python ./scripts/multiapi_init_gen.py azure-mgmt-managementgroups - repo: azure-libraries-for-java - repo: azure-sdk-for-go ``` @@ -109,6 +111,50 @@ python: output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups ``` +### Python multi-api + +Generate all API versions currently shipped for this package + +```yaml $(python) && $(multiapi) +batch: + - tag: package-2018-01 + - tag: package-2017-11 + - tag: package-2017-08 +``` + +### Tag: package-2018-01 and python + +These settings apply only when `--tag=package-2018-01 --python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-2018-01' && $(python) +python: + namespace: azure.mgmt.managementgroups.v2018_01_01 + output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups/azure/mgmt/managementgroups/v2018_01_01 +``` + +### Tag: package-2017-11 and python + +These settings apply only when `--tag=package-2017-11 --python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-2017-11' && $(python) +python: + namespace: azure.mgmt.managementgroups.v2017_11_01 + output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups/azure/mgmt/managementgroups/v2017_11_01 +``` + +### Tag: package-2017-08 and python + +These settings apply only when `--tag=package-2017-08 --python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-2017-08' && $(python) +python: + namespace: azure.mgmt.managementgroups.v2017_08_31 + output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups/azure/mgmt/managementgroups/v2017_08_31 +``` + ## Go These settings apply only when `--go` is specified on the command line. From 733ad6775e162eb6f6f2b626fedb7b5f100a101c Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Fri, 9 Feb 2018 18:33:55 -0800 Subject: [PATCH 04/11] Fix bug --- specification/managementgroups/resource-manager/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/managementgroups/resource-manager/readme.md b/specification/managementgroups/resource-manager/readme.md index a9c1a2f93c8a..bbea2c931f2c 100644 --- a/specification/managementgroups/resource-manager/readme.md +++ b/specification/managementgroups/resource-manager/readme.md @@ -30,9 +30,9 @@ tag: package-2018-01 ### Tag: package-2018-01 These settings apply only when `--tag=package-2018-01` is specified on the command line. -``` yaml $(tag) == 'package-2018-11' +``` yaml $(tag) == 'package-2018-01' input-file: -- Microsoft.Management/preview/2018-01-01-preview/management.json + - Microsoft.Management/preview/2018-01-01-preview/management.json ``` ### Tag: package-2017-11 @@ -40,7 +40,7 @@ These settings apply only when `--tag=package-2017-11` is specified on the comma ``` yaml $(tag) == 'package-2017-11' input-file: -- Microsoft.Management/preview/2017-11-01-preview/management.json + - Microsoft.Management/preview/2017-11-01-preview/management.json ``` ### Tag: package-2017-08 @@ -48,7 +48,7 @@ These settings apply only when `--tag=package-2017-08` is specified on the comma ``` yaml $(tag) == 'package-2017-08' input-file: -- Microsoft.Management/preview/2017-08-31-preview/management.json + - Microsoft.Management/preview/2017-08-31-preview/management.json ``` --- From a21fc251f410b7db41174539ff48a2c74a221291 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Sun, 11 Feb 2018 12:32:41 -0800 Subject: [PATCH 05/11] Remove management groups from resources --- .../addManagementGroupSubscription.json | 10 - .../createOrUpdateManagementGroup.json | 34 - .../examples/getManagementGroup.json | 30 - .../getManagementGroupWithExpand.json | 47 -- ...etManagementGroupWithExpandAndRecurse.json | 74 -- .../removeManagementGroupSubscription.json | 10 - .../examples/updateManagementGroup.json | 34 - .../2017-11-01-preview/management.json | 699 ------------------ .../resources/resource-manager/readme.md | 64 -- 9 files changed, 1002 deletions(-) delete mode 100644 specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json delete mode 100644 specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json delete mode 100644 specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json delete mode 100644 specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json delete mode 100644 specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json delete mode 100644 specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json delete mode 100644 specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json delete mode 100644 specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/management.json diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json b/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json deleted file mode 100644 index 67d4bd31de9f..000000000000 --- a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/addManagementGroupSubscription.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parameters": { - "api-version": "2017-11-01-preview", - "groupId": "00000000-0000-0000-0000-000000000001", - "subscriptionId": "00000000-0000-0000-0000-000000000011" - }, - "responses": { - "204": {} - } -} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json b/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json deleted file mode 100644 index 04d978153597..000000000000 --- a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/createOrUpdateManagementGroup.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parameters": { - "api-version": "2017-11-01-preview", - "groupId": "00000000-0000-0000-0000-000000000002", - "createManagementGroupRequest": { - "properties ": { - "displayName": "Group Name 2", - "parentGroupId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000002", - "type": "/providers/Microsoft.Management/managementGroups", - "name": "00000000-0000-0000-0000-000000000002", - "properties": { - "tenantId": "00000000-0000-0000-0000-000000000000", - "displayName": "Group Name 2", - "details": { - "version": 1, - "updatedTime": "2017-01-01T00:00:00.00Z", - "updatedBy": "Test", - "parent": { - "parentId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001", - "displayName": "Group Name 1" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json b/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json deleted file mode 100644 index 8f9f6d275303..000000000000 --- a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroup.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "api-version": "2018-01-01-preview", - "groupId": "20000000-0001-0000-0000-000000000000", - "Cache-Control": "no-cache" - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.Management/managementGroups/20000000-0001-0000-0000-000000000000", - "type": "/providers/Microsoft.Management/managementGroups", - "name": "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": "16b8ef21-5c9f-420c-bcc9-e4f8c9f30b4b", - "parent": { - "parentId": "/providers/Microsoft.Management/managementGroups/RootGroup", - "displayName": "RootGroup" - } - }, - "children": null - } - } - } - } -} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json b/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json deleted file mode 100644 index 92208cbaa967..000000000000 --- a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpand.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2017-11-01-preview", - "groupId": "00000000-0000-0000-0000-000000000001", - "$expand": "children", - "Cache-Control": "no-cache" - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001", - "type": "/providers/Microsoft.Management/managementGroups", - "name": "00000000-0000-0000-0000-000000000001", - "properties": { - "tenantId": "00000000-0000-0000-0000-000000000000", - "displayName": "Group Name 1", - "details": { - "version": 1, - "updatedTime": "2017-01-01T00:00:00Z", - "updatedBy": "Test", - "parent": { - "parentId": "/providers/Microsoft.Management/managementGroups/RootGroup", - "displayName": "RootGroup" - } - }, - "children": [ - { - "childType": "ManagementGroup", - "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000002", - "displayName": "Group Name 2" - }, - { - "childType": "ManagementGroup", - "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000003", - "displayName": "Group Name 3" - }, - { - "childType": "Subscription", - "childId": "/subscriptions/00000000-0000-0000-0000-000000000011", - "displayName": "Subscription Name 1" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json b/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json deleted file mode 100644 index af11b4d0169f..000000000000 --- a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/getManagementGroupWithExpandAndRecurse.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "parameters": { - "api-version": "2017-11-01-preview", - "groupId": "00000000-0000-0000-0000-000000000001", - "$expand": "children", - "$recurse": true, - "Cache-Control": "no-cache" - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001", - "type": "/providers/Microsoft.Management/managementGroups", - "name": "00000000-0000-0000-0000-000000000001", - "properties": { - "tenantId": "00000000-0000-0000-0000-000000000000", - "displayName": "Group Name 1", - "details": { - "version": 1, - "updatedTime": "2017-01-01T00:00:00Z", - "updatedBy": "Test", - "parent": { - "parentId": "/providers/Microsoft.Management/managementGroups/RootGroup", - "displayName": "RootGroup" - } - }, - "children": [ - { - "childType": "ManagementGroup", - "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000002", - "displayName": "Group Name 2", - "children": [ - { - "childType": "ManagementGroup", - "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000004", - "displayName": "Group Name 4", - "children": [ - { - "childType": "Subscription", - "childId": "/subscriptions/00000000-0000-0000-0000-000000000012", - "displayName": "Subscription Name 2" - }, - { - "childType": "Subscription", - "childId": "/subscriptions/00000000-0000-0000-0000-000000000013", - "displayName": "Subscription Name 3" - } - ] - } - ] - }, - { - "childType": "ManagementGroup", - "childId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000003", - "displayName": "Group Name 3", - "children": [ - { - "childType": "Subscription", - "childId": "/subscriptions/00000000-0000-0000-0000-000000000014", - "displayName": "Subscription Name 4" - } - ] - }, - { - "childType": "Subscription", - "childId": "/subscriptions/00000000-0000-0000-0000-000000000011", - "displayName": "Subscription Name 1" - } - ] - } - } - } - } -} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json b/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json deleted file mode 100644 index 67d4bd31de9f..000000000000 --- a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/removeManagementGroupSubscription.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "parameters": { - "api-version": "2017-11-01-preview", - "groupId": "00000000-0000-0000-0000-000000000001", - "subscriptionId": "00000000-0000-0000-0000-000000000011" - }, - "responses": { - "204": {} - } -} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json b/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json deleted file mode 100644 index 7e815ef190a6..000000000000 --- a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/examples/updateManagementGroup.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parameters": { - "api-version": "2017-11-01-preview", - "groupId": "00000000-0000-0000-0000-000000000002", - "createManagementGroupRequest": { - "properties ": { - "displayName": "Group Name 2", - "parentGroupId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000002", - "type": "/providers/Microsoft.Management/managementGroups", - "name": "00000000-0000-0000-0000-000000000002", - "properties": { - "tenantId": "00000000-0000-0000-0000-000000000000", - "displayName": "Group Name 2", - "details": { - "version": 1, - "updatedTime": "2017-01-01T00:00:00.00Z", - "updatedBy": "Test", - "parent": { - "parentId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000001", - "displayName": "Group Name 1" - } - } - } - } - } - } -} \ No newline at end of file diff --git a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/management.json b/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/management.json deleted file mode 100644 index 19eb90ccb5f7..000000000000 --- a/specification/resources/resource-manager/Microsoft.Management/preview/2017-11-01-preview/management.json +++ /dev/null @@ -1,699 +0,0 @@ -{ - "swagger": "2.0", - "host": "management.azure.com", - "info": { - "version": "2017-11-01-preview", - "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" - }, - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow.", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "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", - "description": "Management operations supported by the Microsoft.Management resource provider.\n" - } - ], - "paths": { - "/providers/Microsoft.Management/managementGroups": { - "get": { - "tags": [ - "ManagementGroups" - ], - "operationId": "ManagementGroups_List", - "description": "List management groups for the authenticated user.\n", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" - }, - { - "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" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ManagementGroupListResult" - } - }, - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "GetManagementGroups": { - "$ref": "./examples/listManagementGroups.json" - } - } - } - }, - "/providers/Microsoft.Management/managementGroups/{groupId}": { - "get": { - "tags": [ - "ManagementGroups" - ], - "operationId": "ManagementGroups_Get", - "description": "Get the details of the management group.\n", - "parameters": [ - { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/ExpandParameter" - }, - { - "$ref": "#/parameters/RecurseParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ManagementGroup" - } - }, - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "GetManagementGroup": { - "$ref": "./examples/getManagementGroup.json" - }, - "GetManagementGroupWithExpand": { - "$ref": "./examples/getManagementGroupWithExpand.json" - }, - "GetManagementGroupsWithExpandAndRecurse": { - "$ref": "./examples/getManagementGroupWithExpandAndRecurse.json" - } - } - }, - "put": { - "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", - "parameters": [ - { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CreateManagementGroupRequestParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ManagementGroup" - } - }, - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "PutManagementGroup": { - "$ref": "./examples/createOrUpdateManagementGroup.json" - } - } - }, - "patch": { - "tags": [ - "ManagementGroups" - ], - "operationId": "ManagementGroups_Update", - "description": "Update a management group.\n", - "parameters": [ - { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CreateManagementGroupRequestParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/ManagementGroup" - } - }, - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "PatchManagementGroup": { - "$ref": "./examples/updateManagementGroup.json" - } - } - }, - "delete": { - "tags": [ - "ManagementGroups" - ], - "operationId": "ManagementGroups_Delete", - "description": "Delete management group.\nIf a management group contains child resources, the request will fail.\n", - "parameters": [ - { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" - } - ], - "responses": { - "200": { - "description": "OK - management group deleted successfully" - }, - "204": { - "description": "NoContent - management group does not exist" - }, - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "DeleteManagementGroup": { - "$ref": "./examples/deleteManagementGroup.json" - } - } - } - }, - "/providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}": { - "put": { - "tags": [ - "ManagementGroups" - ], - "operationId": "ManagementGroupSubscriptions_Create", - "description": "Associates existing subscription with the management group.\n", - "parameters": [ - { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" - } - ], - "responses": { - "204": { - "description": "No Content" - }, - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "AddSubscriptionToManagementGroup": { - "$ref": "./examples/addManagementGroupSubscription.json" - } - } - }, - "delete": { - "tags": [ - "ManagementGroups" - ], - "operationId": "ManagementGroupSubscriptions_Delete", - "description": "De-associates subscription from the management group.\n", - "parameters": [ - { - "$ref": "#/parameters/GroupIdParameter" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/CacheControlHeader" - } - ], - "responses": { - "204": { - "description": "No Content - subscription deleted successfully" - }, - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "DeleteSubscriptionFromManagementGroup": { - "$ref": "./examples/removeManagementGroupSubscription.json" - } - } - } - }, - "/providers/Microsoft.Management/operations": { - "get": { - "tags": [ - "Operations" - ], - "operationId": "Operations_List", - "description": "Lists all of the available Management REST API operations.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. The request has succeeded.", - "schema": { - "$ref": "#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "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" - } - } - }, - "Operation": { - "description": "Operation supported by the Microsoft.Management resource provider.", - "type": "object", - "properties": { - "name": { - "description": "Operation name: {provider}/{resource}/{operation}.", - "type": "string", - "readOnly": true - }, - "display": { - "description": "The object that represents the operation.", - "properties": { - "provider": { - "description": "The name of the provider.", - "type": "string", - "readOnly": true - }, - "resource": { - "description": "The resource on which the operation is performed.", - "type": "string", - "readOnly": true - }, - "operation": { - "description": "The operation that can be performed.", - "type": "string", - "readOnly": true - }, - "description": { - "description": "Operation description.", - "type": "string", - "readOnly": true - } - } - } - } - }, - "OperationListResult": { - "description": "Describes the result of the request to list Microsoft.Management operations.", - "properties": { - "value": { - "description": "List of operations supported by the Microsoft.Management resource provider.", - "type": "array", - "readOnly": true, - "items": { - "$ref": "#/definitions/Operation" - } - }, - "nextLink": { - "description": "URL to get the next set of operation list results if there are any.", - "type": "string", - "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": { - "type": "string", - "description": "The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", - "readOnly": true - }, - "type": { - "type": "string", - "description": "The type of the resource. For example, /providers/Microsoft.Management/managementGroups", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000", - "readOnly": true - }, - "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "$ref": "#/definitions/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." - } - } - }, - "ManagementGroup": { - "description": "The management group details.", - "x-ms-azure-resource": true, - "properties": { - "id": { - "type": "string", - "description": "The fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000", - "readOnly": true - }, - "type": { - "type": "string", - "description": "The type of the resource. For example, /providers/Microsoft.Management/managementGroups", - "readOnly": true - }, - "name": { - "type": "string", - "description": "The name of the management group. For example, 00000000-0000-0000-0000-000000000000", - "readOnly": true - }, - "properties": { - "title": "Properties", - "x-ms-client-flatten": true, - "$ref": "#/definitions/ManagementGroupProperties" - } - } - }, - "ManagementGroupProperties": { - "description": "The generic properties of a management group.", - "type": "object", - "properties": { - "tenantId": { - "type": "string", - "description": "The AAD Tenant ID associated with the management group. For example, 00000000-0000-0000-0000-000000000000" - }, - "displayName": { - "type": "string", - "description": "The friendly name of the management group." - }, - "details": { - "title": "Details", - "$ref": "#/definitions/ManagementGroupDetails" - }, - "children": { - "description": "The list of children.", - "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" - } - } - }, - "ManagementGroupChildInfo": { - "description": "The child information of a management group.", - "properties": { - "childType": { - "title": "The type of child resource.", - "$ref": "#/definitions/ManagementGroupChildType" - }, - "childId": { - "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" - }, - "displayName": { - "type": "string", - "description": "The friendly name of the child resource." - }, - "children": { - "description": "The list of children.", - "type": "array", - "items": { - "$ref": "#/definitions/ManagementGroupChildInfo" - } - } - } - }, - "ParentGroupInfo": { - "description": "(Optional) The ID of the parent management group.", - "properties": { - "parentId": { - "type": "string", - "description": "The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" - }, - "displayName": { - "type": "string", - "description": "The friendly name of the parent management group." - } - } - }, - "ManagementGroupChildType": { - "type": "string", - "enum": [ - "ManagementGroup", - "Subscription" - ], - "description": "The type of child resource." - }, - "CreateManagementGroupRequest": { - "description": "Management group creation parameters.", - "type": "object", - "properties": { - "displayName": { - "type": "string", - "description": "The friendly name of the management group." - }, - "parentId": { - "type": "string", - "description": "(Optional) The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000" - } - } - } - }, - "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 2017-11-01-preview." - }, - "ExpandParameter": { - "name": "$expand", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "children" - ], - "x-ms-parameter-location": "method", - "description": "The $expand=children query string parameter allows clients to request inclusion of children in the response payload." - }, - "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." - }, - "CreateManagementGroupRequestParameter": { - "name": "createManagementGroupRequest", - "in": "body", - "required": true, - "description": "Management group creation parameters.", - "x-ms-parameter-location": "method", - "schema": { - "$ref": "#/definitions/CreateManagementGroupRequest" - } - }, - "CacheControlHeader": { - "name": "Cache-Control", - "in": "header", - "default": "no-cache", - "description": "Indicates that the request shouldn't utilize any caches.", - "x-ms-parameter-location": "method", - "type": "string" - } - } -} \ No newline at end of file diff --git a/specification/resources/resource-manager/readme.md b/specification/resources/resource-manager/readme.md index 1d567cd2dd4b..8d342000696b 100644 --- a/specification/resources/resource-manager/readme.md +++ b/specification/resources/resource-manager/readme.md @@ -56,10 +56,6 @@ tag: package-links-2016-09 tag: package-managedapplications-2016-09 ``` -``` yaml $(package-management) -tag: package-management-2017-11 -``` - ### Tag: package-features-2015-12 These settings apply only when `--tag=package-features-2015-12` is specified on the command line. @@ -207,30 +203,6 @@ input-file: - Microsoft.Solutions/preview/2016-09-01-preview/managedapplications.json ``` -### Tag: package-management-2018-01 -These settings apply only when `--tag=package-management-2018-01` is specified on the command line. - -``` yaml $(tag) == 'package-management-2018-01' -input-file: -- Microsoft.Management/preview/2018-01-01-preview/management.json -``` - -### Tag: package-management-2017-11 -These settings apply only when `--tag=package-management-2017-11` is specified on the command line. - -``` yaml $(tag) == 'package-management-2017-11' -input-file: -- Microsoft.Management/preview/2017-11-01-preview/management.json -``` - -### Tag: package-management-2017-08 -These settings apply only when `--tag=package-management-2017-08` is specified on the command line. - -``` yaml $(tag) == 'package-management-2017-08' -input-file: -- Microsoft.Management/preview/2017-08-31-preview/management.json -``` - --- # Code Generation @@ -274,7 +246,6 @@ batch: - package-resources: true - package-subscriptions: true - package-links: true - - package-management: true # - package-managedapplications: true ``` @@ -309,8 +280,6 @@ batch: - tag: package-subscriptions-2015-11 - tag: package-links-2016-09 - tag: package-managedapplications-2016-09 - - tag: package-management-2017-11 - - tag: package-management-2017-08 ``` ### Tag: package-features-2015-12 and go @@ -473,26 +442,6 @@ namespace: managedapplications output-folder: $(go-sdk-folder)/services/resources/mgmt/2016-09-01-preview/managedapplications ``` -### Tag: package-management-2017-11 and go - -These settings apply only when `--tag=package-management-2017-11 --go` is specified on the command line. -Please also specify `--go-sdk-folder=`. - -``` yaml $(tag) == 'package-management-2017-11' && $(go) -namespace: management -output-folder: $(go-sdk-folder)/services/resources/mgmt/2017-11-01-preview/management -``` - -### Tag: package-management-2017-08 and go - -These settings apply only when `--tag=package-management-2017-08 --go` is specified on the command line. -Please also specify `--go-sdk-folder=`. - -``` yaml $(tag) == 'package-management-2017-08' && $(go) -namespace: management -output-folder: $(go-sdk-folder)/services/resources/mgmt/2017-08-31-preview/management -``` - ## Python These settings apply only when `--python` is specified on the command line. @@ -528,7 +477,6 @@ batch: - tag: package-resources-2016-09 - tag: package-resources-2016-02 - tag: package-subscriptions-2016-06 - - tag: package-management-2017-11 ``` ### Tag: package-features-2015-12 and python @@ -674,17 +622,6 @@ python: output-folder: $(python-sdks-folder)/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2016_06_01 ``` -### Tag: package-management-2017-11 and python - -These settings apply only when `--tag=package-management-2017-11 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-management-2017-11' && $(python) -python: - namespace: azure.mgmt.resource.managementgroups - output-folder: $(python-sdks-folder)/azure-mgmt-resource/azure/mgmt/resource/managementgroups -``` - ## Java These settings apply only when `--java` is specified on the command line. @@ -712,5 +649,4 @@ batch: - package-subscriptions: true - package-links: true - package-managedapplications: true - - package-management: true ``` \ No newline at end of file From c0ef0b8683ea6523f436ad9044426d476633f615 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Sun, 11 Feb 2018 13:53:22 -0800 Subject: [PATCH 06/11] Change groupId and cache control to method scope --- .../preview/2018-01-01-preview/management.json | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/management.json b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/management.json index ab03083e0929..792dd2934b30 100644 --- a/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/management.json +++ b/specification/managementgroups/resource-manager/Microsoft.Management/preview/2018-01-01-preview/management.json @@ -160,7 +160,7 @@ "$ref": "#/parameters/CacheControlHeader" }, { - "$ref": "#/parameters/CreateGroupRequestParameter" + "$ref": "#/parameters/CreateManagementGroupRequestParameter" } ], "responses": { @@ -1166,7 +1166,8 @@ "in": "path", "required": true, "type": "string", - "description": "Subscription ID." + "description": "Subscription ID.", + "x-ms-parameter-location": "method" }, "ApiVersionParameter": { "name": "api-version", @@ -1194,8 +1195,8 @@ "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." }, - "CreateGroupRequestParameter": { - "name": "createGroupRequest", + "CreateManagementGroupRequestParameter": { + "name": "createManagementGroupRequest", "in": "body", "required": true, "description": "Management group creation parameters.", @@ -1261,7 +1262,7 @@ "default": "no-cache", "description": "Indicates that the request shouldn't utilize any caches.", "type": "string", - "required": true + "x-ms-parameter-location": "method" }, "EntityViewParameter": { "name": "view", From ce5b89eec52f3a40fe21484ccc388fef9911eb4f Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Sun, 11 Feb 2018 14:06:50 -0800 Subject: [PATCH 07/11] Update readme.md to use the old version --- specification/managementgroups/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/managementgroups/resource-manager/readme.md b/specification/managementgroups/resource-manager/readme.md index bbea2c931f2c..7d7573b6bc20 100644 --- a/specification/managementgroups/resource-manager/readme.md +++ b/specification/managementgroups/resource-manager/readme.md @@ -24,7 +24,7 @@ These are the global settings for the API. ``` yaml openapi-type: arm -tag: package-2018-01 +tag: package-2017-11 ``` ### Tag: package-2018-01 From 8c2f6aec9f6f2e1899ca9028964bb58bbea8872a Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Mon, 12 Feb 2018 09:02:21 -0800 Subject: [PATCH 08/11] Fix Python conf --- .../resource-manager/readme.md | 51 +------------------ 1 file changed, 2 insertions(+), 49 deletions(-) diff --git a/specification/managementgroups/resource-manager/readme.md b/specification/managementgroups/resource-manager/readme.md index 7d7573b6bc20..179025e7c1ee 100644 --- a/specification/managementgroups/resource-manager/readme.md +++ b/specification/managementgroups/resource-manager/readme.md @@ -63,13 +63,10 @@ This is not used by Autorest itself. ``` yaml $(swagger-to-sdk) swagger-to-sdk: - repo: azure-sdk-for-python - after_scripts: - - python ./scripts/multiapi_init_gen.py azure-mgmt-managementgroups - repo: azure-libraries-for-java - repo: azure-sdk-for-go ``` - ## C# These settings apply only when `--csharp` is specified on the command line. @@ -95,7 +92,7 @@ python-mode: create python: azure-arm: true license-header: MICROSOFT_MIT_NO_VERSION - payload-flattening-threshold: 2 + payload-flattening-threshold: 1 namespace: azure.mgmt.managementgroups package-name: azure-mgmt-managementgroups clear-output-folder: true @@ -111,50 +108,6 @@ python: output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups ``` -### Python multi-api - -Generate all API versions currently shipped for this package - -```yaml $(python) && $(multiapi) -batch: - - tag: package-2018-01 - - tag: package-2017-11 - - tag: package-2017-08 -``` - -### Tag: package-2018-01 and python - -These settings apply only when `--tag=package-2018-01 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2018-01' && $(python) -python: - namespace: azure.mgmt.managementgroups.v2018_01_01 - output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups/azure/mgmt/managementgroups/v2018_01_01 -``` - -### Tag: package-2017-11 and python - -These settings apply only when `--tag=package-2017-11 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2017-11' && $(python) -python: - namespace: azure.mgmt.managementgroups.v2017_11_01 - output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups/azure/mgmt/managementgroups/v2017_11_01 -``` - -### Tag: package-2017-08 and python - -These settings apply only when `--tag=package-2017-08 --python` is specified on the command line. -Please also specify `--python-sdks-folder=`. - -``` yaml $(tag) == 'package-2017-08' && $(python) -python: - namespace: azure.mgmt.managementgroups.v2017_08_31 - output-folder: $(python-sdks-folder)/azure-mgmt-managementgroups/azure/mgmt/managementgroups/v2017_08_31 -``` - ## Go These settings apply only when `--go` is specified on the command line. @@ -215,4 +168,4 @@ java: license-header: MICROSOFT_MIT_NO_CODEGEN payload-flattening-threshold: 1 output-folder: $(azure-libraries-for-java-folder)/azure-mgmt-managementgroups -``` \ No newline at end of file +``` From 16f49826dda9bd0e39350d13390c7bcd0a608540 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Mon, 12 Feb 2018 12:52:18 -0800 Subject: [PATCH 09/11] Fix Go settings --- .../managementgroups/resource-manager/readme.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/specification/managementgroups/resource-manager/readme.md b/specification/managementgroups/resource-manager/readme.md index 7d7573b6bc20..4c0ab226c40f 100644 --- a/specification/managementgroups/resource-manager/readme.md +++ b/specification/managementgroups/resource-manager/readme.md @@ -177,11 +177,11 @@ batch: ### Tag: package-2018-01 and go -These settings apply only when `--tag=package-2017-11 --go` is specified on the command line. +These settings apply only when `--tag=package-2018-01 --go` is specified on the command line. Please also specify `--go-sdk-folder=`. -``` yaml $(tag)=='package-2017-11' && $(go) -output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-11-15/managementgroups +``` yaml $(tag)=='package-2018-01' && $(go) +output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2018-01-01-preview/managementgroups ``` ### Tag: package-2017-11 and go @@ -190,16 +190,16 @@ These settings apply only when `--tag=package-2017-11 --go` is specified on the Please also specify `--go-sdk-folder=`. ``` yaml $(tag)=='package-2017-11' && $(go) -output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-11-15/managementgroups +output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-11-01-preview/managementgroups ``` ### Tag: package-2017-08 and go -These settings apply only when `--tag=package-2017-11 --go` is specified on the command line. +These settings apply only when `--tag=package-2017-08 --go` is specified on the command line. Please also specify `--go-sdk-folder=`. ``` yaml $(tag)=='package-2017-08' && $(go) -output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-08-21-preview/managementgroups +output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-08-31-preview/managementgroups ``` ## Java From 5bc0b510756374a984e3523058fbc45318d3bede Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Mon, 12 Feb 2018 13:08:20 -0800 Subject: [PATCH 10/11] revert go sdk path for 2017-08-31 --- specification/managementgroups/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/managementgroups/resource-manager/readme.md b/specification/managementgroups/resource-manager/readme.md index cdfde1b0ea93..847c6c4e678f 100644 --- a/specification/managementgroups/resource-manager/readme.md +++ b/specification/managementgroups/resource-manager/readme.md @@ -152,7 +152,7 @@ These settings apply only when `--tag=package-2017-08 --go` is specified on the Please also specify `--go-sdk-folder=`. ``` yaml $(tag)=='package-2017-08' && $(go) -output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-08-31-preview/managementgroups +output-folder: $(go-sdk-folder)/services/resources/mgmt/2017-08-31-preview/management ``` ## Java From 6d8ea2134bc8155bd6162598d67880cd68a2c31d Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Mon, 12 Feb 2018 15:52:04 -0800 Subject: [PATCH 11/11] Revert go output folder --- specification/managementgroups/resource-manager/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/managementgroups/resource-manager/readme.md b/specification/managementgroups/resource-manager/readme.md index 847c6c4e678f..19b0d5b80f3c 100644 --- a/specification/managementgroups/resource-manager/readme.md +++ b/specification/managementgroups/resource-manager/readme.md @@ -134,7 +134,7 @@ These settings apply only when `--tag=package-2018-01 --go` is specified on the Please also specify `--go-sdk-folder=`. ``` yaml $(tag)=='package-2018-01' && $(go) -output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2018-01-01-preview/managementgroups +output-folder: $(go-sdk-folder)/services/resources/mgmt/2018-01-01-preview/management ``` ### Tag: package-2017-11 and go @@ -143,7 +143,7 @@ These settings apply only when `--tag=package-2017-11 --go` is specified on the Please also specify `--go-sdk-folder=`. ``` yaml $(tag)=='package-2017-11' && $(go) -output-folder: $(go-sdk-folder)/services/managementgroups/mgmt/2017-11-01-preview/managementgroups +output-folder: $(go-sdk-folder)/services/resources/mgmt/2017-11-01-preview/management ``` ### Tag: package-2017-08 and go