From d288f7161b04664c8775b3e082e99f96bc64403d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 16 Nov 2021 03:43:22 +0000 Subject: [PATCH] CodeGen from PR 16763 in Azure/azure-rest-api-specs Merge 1de86290055518109e3cf73a0ecb5e1a9e5e6c76 into 48e3687f073bee2cdc03b1bab8b2cbbee07dcf49 --- .../arm-managementgroups/LICENSE.txt | 2 +- .../arm-managementgroups/README.md | 8 +- .../arm-managementgroups/package.json | 20 +- .../arm-managementgroups/rollup.config.js | 24 +- .../src/managementGroupsAPI.ts | 7 +- .../src/managementGroupsAPIContext.ts | 9 +- .../src/models/entitiesMappers.ts | 15 +- .../hierarchySettingsOperationsMappers.ts | 29 + .../arm-managementgroups/src/models/index.ts | 1436 +++++++++++------ .../managementGroupSubscriptionsMappers.ts | 27 +- .../src/models/managementGroupsMappers.ts | 40 +- .../src/models/mappers.ts | 554 ++++++- .../src/models/operationsMappers.ts | 15 +- .../src/models/parameters.ts | 5 +- .../src/operations/entities.ts | 16 +- .../operations/hierarchySettingsOperations.ts | 306 ++++ .../src/operations/index.ts | 6 +- .../managementGroupSubscriptions.ts | 186 ++- .../src/operations/managementGroups.ts | 159 +- .../src/operations/operations.ts | 8 +- .../arm-managementgroups/tsconfig.json | 2 +- 21 files changed, 2178 insertions(+), 696 deletions(-) create mode 100644 sdk/managementgroups/arm-managementgroups/src/models/hierarchySettingsOperationsMappers.ts create mode 100644 sdk/managementgroups/arm-managementgroups/src/operations/hierarchySettingsOperations.ts diff --git a/sdk/managementgroups/arm-managementgroups/LICENSE.txt b/sdk/managementgroups/arm-managementgroups/LICENSE.txt index a70e8cf66038..2d3163745319 100644 --- a/sdk/managementgroups/arm-managementgroups/LICENSE.txt +++ b/sdk/managementgroups/arm-managementgroups/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/managementgroups/arm-managementgroups/README.md b/sdk/managementgroups/arm-managementgroups/README.md index cc428f2793f5..4cde6b3c1bf6 100644 --- a/sdk/managementgroups/arm-managementgroups/README.md +++ b/sdk/managementgroups/arm-managementgroups/README.md @@ -1,11 +1,11 @@ ## Azure ManagementGroupsAPI SDK for JavaScript -This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ManagementGroupsAPI. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for ManagementGroupsAPI. ### Currently supported environments - [LTS versions of Node.js](https://nodejs.org/about/releases/) -- Latest versions of Safari, Chrome, Edge, and Firefox. +- Latest versions of Safari, Chrome, Edge and Firefox. ### Prerequisites @@ -21,7 +21,6 @@ Install both packages using the below command: ```bash npm install --save @azure/arm-managementgroups @azure/identity ``` - > **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. @@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/ In the below samples, we pass the credential and the Azure subscription id to instantiate the client. Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. - #### nodejs - Authentication, client creation, and list managementGroups as an example written in JavaScript. ##### Sample code @@ -87,7 +85,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t const credential = new InteractiveBrowserCredential( { clientId: "", - tenantId: "" + tenant: "" }); const client = new Azure.ArmManagementgroups.ManagementGroupsAPI(creds, subscriptionId); const cacheControl = "testcacheControl"; diff --git a/sdk/managementgroups/arm-managementgroups/package.json b/sdk/managementgroups/arm-managementgroups/package.json index c68c1d70959f..d609982a3f51 100644 --- a/sdk/managementgroups/arm-managementgroups/package.json +++ b/sdk/managementgroups/arm-managementgroups/package.json @@ -4,10 +4,10 @@ "description": "ManagementGroupsAPI Library with typescript type definitions for node.js and browser.", "version": "1.2.1", "dependencies": { - "@azure/ms-rest-azure-js": "^1.4.0", - "@azure/ms-rest-js": "^1.11.0", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", "@azure/core-auth": "^1.1.4", - "tslib": "^1.9.3" + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -22,17 +22,18 @@ "types": "./esm/managementGroupsAPI.d.ts", "devDependencies": { "typescript": "^3.6.0", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/feature/v4/sdk/managementgroups/arm-managementgroups", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/managementgroups/arm-managementgroups", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -44,6 +45,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/managementgroups/arm-managementgroups/rollup.config.js b/sdk/managementgroups/arm-managementgroups/rollup.config.js index 66567ccb2196..fba88538d901 100644 --- a/sdk/managementgroups/arm-managementgroups/rollup.config.js +++ b/sdk/managementgroups/arm-managementgroups/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/managementGroupsAPI.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/managementGroupsAPI.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-managementgroups.js", format: "umd", @@ -15,17 +21,17 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPI.ts b/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPI.ts index e934c83510da..1fe6323a0608 100644 --- a/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPI.ts +++ b/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPI.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -21,6 +20,7 @@ class ManagementGroupsAPI extends ManagementGroupsAPIContext { // Operation groups managementGroups: operations.ManagementGroups; managementGroupSubscriptions: operations.ManagementGroupSubscriptions; + hierarchySettings: operations.HierarchySettingsOperations; operations: operations.Operations; entities: operations.Entities; @@ -38,6 +38,7 @@ class ManagementGroupsAPI extends ManagementGroupsAPIContext { super(credentials, options); this.managementGroups = new operations.ManagementGroups(this); this.managementGroupSubscriptions = new operations.ManagementGroupSubscriptions(this); + this.hierarchySettings = new operations.HierarchySettingsOperations(this); this.operations = new operations.Operations(this); this.entities = new operations.Entities(this); } diff --git a/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPIContext.ts b/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPIContext.ts index 1c2ab0085c66..400f00c46c93 100644 --- a/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPIContext.ts +++ b/sdk/managementgroups/arm-managementgroups/src/managementGroupsAPIContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,8 +9,8 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; -import { TokenCredential } from "@azure/core-auth"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-managementgroups"; const packageVersion = "1.2.1"; @@ -45,7 +44,7 @@ export class ManagementGroupsAPIContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2018-03-01-preview'; + this.apiVersion = '2021-04-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/managementgroups/arm-managementgroups/src/models/entitiesMappers.ts b/sdk/managementgroups/arm-managementgroups/src/models/entitiesMappers.ts index 4d59b7d20746..b04fd56afb82 100644 --- a/sdk/managementgroups/arm-managementgroups/src/models/entitiesMappers.ts +++ b/sdk/managementgroups/arm-managementgroups/src/models/entitiesMappers.ts @@ -1,18 +1,15 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - EntityListResult, EntityInfo, + EntityListResult, EntityParentGroupInfo, - ErrorResponse, - ErrorDetails + ErrorDetails, + ErrorResponse } from "../models/mappers"; - diff --git a/sdk/managementgroups/arm-managementgroups/src/models/hierarchySettingsOperationsMappers.ts b/sdk/managementgroups/arm-managementgroups/src/models/hierarchySettingsOperationsMappers.ts new file mode 100644 index 000000000000..c1f778e3f6a4 --- /dev/null +++ b/sdk/managementgroups/arm-managementgroups/src/models/hierarchySettingsOperationsMappers.ts @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + CreateManagementGroupChildInfo, + CreateManagementGroupDetails, + CreateManagementGroupRequest, + CreateOrUpdateSettingsRequest, + CreateParentGroupInfo, + DescendantParentGroupInfo, + EntityHierarchyItem, + ErrorDetails, + ErrorResponse, + HierarchySettings, + HierarchySettingsInfo, + HierarchySettingsList, + ManagementGroup, + ManagementGroupChildInfo, + ManagementGroupDetails, + ManagementGroupPathElement, + ParentGroupInfo, + SubscriptionUnderManagementGroup +} from "../models/mappers"; diff --git a/sdk/managementgroups/arm-managementgroups/src/models/index.ts b/sdk/managementgroups/arm-managementgroups/src/models/index.ts index 882699ae9822..c5b1227d926f 100644 --- a/sdk/managementgroups/arm-managementgroups/src/models/index.ts +++ b/sdk/managementgroups/arm-managementgroups/src/models/index.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,1063 +11,1285 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing ErrorDetails. * The details of the error. - * */ export interface ErrorDetails { /** - * @member {string} [code] One of a server-defined set of error codes. + * One of a server-defined set of error codes. */ code?: string; /** - * @member {string} [message] A human-readable representation of the error. + * A human-readable representation of the error. */ message?: string; /** - * @member {string} [details] A human-readable representation of the error's - * details. + * A human-readable representation of the error's details. */ details?: string; } /** - * @interface - * An interface representing ErrorResponse. * The error object. - * */ export interface ErrorResponse { /** - * @member {ErrorDetails} [error] Error. + * Error. */ error?: ErrorDetails; } /** - * @interface - * An interface representing OperationDisplayProperties. * The object that represents the operation. - * */ export interface OperationDisplayProperties { /** - * @member {string} [provider] The name of the provider. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the provider. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provider?: string; /** - * @member {string} [resource] The resource on which the operation is - * performed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The resource on which the operation is performed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resource?: string; /** - * @member {string} [operation] The operation that can be performed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The operation that can be performed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly operation?: string; /** - * @member {string} [description] Operation description. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Operation description. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly description?: string; } /** - * @interface - * An interface representing Operation. * Operation supported by the Microsoft.Management resource provider. - * */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation}. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Operation name: {provider}/{resource}/{operation}. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {OperationDisplayProperties} [display] Display. + * Display. */ display?: OperationDisplayProperties; } /** - * @interface - * An interface representing CheckNameAvailabilityResult. - * Describes the result of the request to check management group name - * availability. - * + * Describes the result of the request to check management group name availability. */ export interface CheckNameAvailabilityResult { /** - * @member {boolean} [nameAvailable] Required. True indicates name is valid - * and available. False indicates the name is invalid, unavailable, or both. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Required. True indicates name is valid and available. False indicates the name is invalid, + * unavailable, or both. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nameAvailable?: boolean; /** - * @member {Reason} [reason] Required if nameAvailable == false. Invalid - * indicates the name provided does not match the resource provider's naming - * requirements (incorrect length, unsupported characters, etc.) - * AlreadyExists indicates that the name is already in use and is therefore - * unavailable. Possible values include: 'Invalid', 'AlreadyExists' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Required if nameAvailable == false. Invalid indicates the name provided does not match the + * resource provider's naming requirements (incorrect length, unsupported characters, etc.) + * AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible + * values include: 'Invalid', 'AlreadyExists' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reason?: Reason; /** - * @member {string} [message] Required if nameAvailable == false. Localized. - * If reason == invalid, provide the user with the reason why the given name - * is invalid, and provide the resource naming requirements so that the user - * can select a valid name. If reason == AlreadyExists, explain that is - * already in use, and direct them to select a different name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Required if nameAvailable == false. Localized. If reason == invalid, provide the user with the + * reason why the given name is invalid, and provide the resource naming requirements so that the + * user can select a valid name. If reason == AlreadyExists, explain that is already in use, and + * direct them to select a different name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; } /** - * @interface - * An interface representing TenantBackfillStatusResult. * The tenant backfill status - * */ export interface TenantBackfillStatusResult { /** - * @member {string} [tenantId] The AAD Tenant ID associated with the - * management group. For example, 00000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The AAD Tenant ID associated with the management group. For example, + * 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tenantId?: string; /** - * @member {Status} [status] The status of the Tenant Backfill. Possible - * values include: 'NotStarted', 'NotStartedButGroupsExist', 'Started', - * 'Failed', 'Cancelled', 'Completed' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The status of the Tenant Backfill. Possible values include: 'NotStarted', + * 'NotStartedButGroupsExist', 'Started', 'Failed', 'Cancelled', 'Completed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: Status; } /** - * @interface - * An interface representing ManagementGroupInfo. * The management group resource. - * */ export interface ManagementGroupInfo { /** - * @member {string} [id] The fully qualified ID for the management group. - * For example, + * The fully qualified ID for the management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [type] The type of the resource. For example, - * /providers/Microsoft.Management/managementGroups - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. For example, Microsoft.Management/managementGroups + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [name] The name of the management group. For example, - * 00000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [tenantId] The AAD Tenant ID associated with the - * management group. For example, 00000000-0000-0000-0000-000000000000 + * The AAD Tenant ID associated with the management group. For example, + * 00000000-0000-0000-0000-000000000000 */ tenantId?: string; /** - * @member {string} [displayName] The friendly name of the management group. + * The friendly name of the management group. */ displayName?: string; } /** - * @interface - * An interface representing ParentGroupInfo. + * The ID of the parent management group. + */ +export interface DescendantParentGroupInfo { + /** + * The fully qualified ID for the parent management group. For example, + * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + */ + id?: string; +} + +/** + * The details of subscription under management group. + */ +export interface SubscriptionUnderManagementGroup extends BaseResource { + /** + * The fully qualified ID for the subscription. For example, + * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/subscriptions/0000000-0000-0000-0000-000000000001 + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The type of the resource. For example, Microsoft.Management/managementGroups/subscriptions + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The stringified id of the subscription. For example, 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The AAD Tenant ID associated with the subscription. For example, + * 00000000-0000-0000-0000-000000000000 + */ + tenant?: string; + /** + * The friendly name of the subscription. + */ + displayName?: string; + /** + * Parent. + */ + parent?: DescendantParentGroupInfo; + /** + * The state of the subscription. + */ + state?: string; +} + +/** * (Optional) The ID of the parent management group. - * */ export interface ParentGroupInfo { /** - * @member {string} [id] The fully qualified ID for the parent management - * group. For example, + * The fully qualified ID for the parent management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 */ id?: string; /** - * @member {string} [name] The name of the parent management group + * The name of the parent management group */ name?: string; /** - * @member {string} [displayName] The friendly name of the parent management - * group. + * The friendly name of the parent management group. + */ + displayName?: string; +} + +/** + * A path element of a management group ancestors. + */ +export interface ManagementGroupPathElement { + /** + * The name of the group. + */ + name?: string; + /** + * The friendly name of the group. */ displayName?: string; } /** - * @interface - * An interface representing ManagementGroupDetails. * The details of a management group. - * */ export interface ManagementGroupDetails { /** - * @member {number} [version] The version number of the object. + * The version number of the object. */ version?: number; /** - * @member {Date} [updatedTime] The date and time when this object was last - * updated. + * The date and time when this object was last updated. */ updatedTime?: Date; /** - * @member {string} [updatedBy] The identity of the principal or process that - * updated the object. + * The identity of the principal or process that updated the object. */ updatedBy?: string; /** - * @member {ParentGroupInfo} [parent] Parent. + * Parent. */ parent?: ParentGroupInfo; + /** + * The path from the root to the current group. + */ + path?: ManagementGroupPathElement[]; + /** + * The ancestors of the management group. + */ + managementGroupAncestors?: string[]; + /** + * The ancestors of the management group displayed in reversed order, from immediate parent to + * the root. + */ + managementGroupAncestorsChain?: ManagementGroupPathElement[]; } /** - * @interface - * An interface representing ManagementGroupChildInfo. * The child information of a management group. - * */ export interface ManagementGroupChildInfo { /** - * @member {Type1} [type] The type of child resource. The fully qualified - * resource type which includes provider namespace (e.g. - * /providers/Microsoft.Management/managementGroups). Possible values - * include: '/providers/Microsoft.Management/managementGroups', - * '/subscriptions' + * The type of child resource. The fully qualified resource type which includes provider + * namespace (e.g. Microsoft.Management/managementGroups). Possible values include: + * 'Microsoft.Management/managementGroups', '/subscriptions' */ type?: Type1; /** - * @member {string} [id] The fully qualified ID for the child resource - * (management group or subscription). For example, - * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + * The fully qualified ID for the child resource (management group or subscription). For + * example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 */ id?: string; /** - * @member {string} [name] The name of the child entity. + * The name of the child entity. */ name?: string; /** - * @member {string} [displayName] The friendly name of the child resource. + * The friendly name of the child resource. */ displayName?: string; /** - * @member {string[]} [roles] The roles definitions associated with the - * management group. - */ - roles?: string[]; - /** - * @member {ManagementGroupChildInfo[]} [children] The list of children. + * The list of children. */ children?: ManagementGroupChildInfo[]; } /** - * @interface - * An interface representing ManagementGroup. * The management group details. - * - * @extends BaseResource */ export interface ManagementGroup extends BaseResource { /** - * @member {string} [id] The fully qualified ID for the management group. - * For example, + * The fully qualified ID for the management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [type] The type of the resource. For example, - * /providers/Microsoft.Management/managementGroups - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. For example, Microsoft.Management/managementGroups + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [name] The name of the management group. For example, - * 00000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [tenantId] The AAD Tenant ID associated with the - * management group. For example, 00000000-0000-0000-0000-000000000000 + * The AAD Tenant ID associated with the management group. For example, + * 00000000-0000-0000-0000-000000000000 */ tenantId?: string; /** - * @member {string} [displayName] The friendly name of the management group. + * The friendly name of the management group. */ displayName?: string; /** - * @member {string[]} [roles] The role definitions associated with the - * management group. - */ - roles?: string[]; - /** - * @member {ManagementGroupDetails} [details] Details. + * Details. */ details?: ManagementGroupDetails; /** - * @member {ManagementGroupChildInfo[]} [children] The list of children. + * The list of children. */ children?: ManagementGroupChildInfo[]; } /** - * @interface - * An interface representing OperationResults. * The results of an asynchronous operation. - * */ export interface OperationResults { /** - * @member {string} [id] The fully qualified ID for the management group. - * For example, + * The fully qualified ID for the management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [type] The type of the resource. For example, - * /providers/Microsoft.Management/managementGroups - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. For example, Microsoft.Management/managementGroups + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [name] The name of the management group. For example, + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The AAD Tenant ID associated with the management group. For example, * 00000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + */ + tenantId?: string; + /** + * The friendly name of the management group. + */ + displayName?: string; +} + +/** + * The results of Azure-AsyncOperation. + */ +export interface AzureAsyncOperationResults { + /** + * The fully qualified ID for the management group. For example, + * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The type of the resource. For example, Microsoft.Management/managementGroups + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {ProvisioningState} [provisioningState] Provisioning State. - * Possible values include: 'Updating' + * The current status of the asynchronous operation performed . For example, Running, Succeeded, + * Failed + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: string; + /** + * The AAD Tenant ID associated with the management group. For example, + * 00000000-0000-0000-0000-000000000000 + */ + tenantId?: string; + /** + * The friendly name of the management group. */ - provisioningState?: ProvisioningState; + displayName?: string; +} + +/** + * Settings defined at the Management Group scope. + */ +export interface HierarchySettings extends BaseResource { + /** + * The fully qualified ID for the settings object. For example, + * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The type of the resource. For example, Microsoft.Management/managementGroups/settings. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The name of the object. In this case, default. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The AAD Tenant ID associated with the hierarchy settings. For example, + * 00000000-0000-0000-0000-000000000000 + */ + tenantId?: string; + /** + * Indicates whether RBAC access is required upon group creation under the root Management Group. + * If set to true, user will require Microsoft.Management/managementGroups/write action on the + * root Management Group scope in order to create new Groups directly under the root. This will + * prevent new users from creating new Management Groups, unless they are given access. + */ + requireAuthorizationForGroupCreation?: boolean; + /** + * Settings that sets the default Management Group under which new subscriptions get added in + * this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup + */ + defaultManagementGroup?: string; +} + +/** + * The hierarchy settings resource. + */ +export interface HierarchySettingsInfo { + /** + * The fully qualified ID for the settings object. For example, + * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000/settings/default. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The type of the resource. For example, Microsoft.Management/managementGroups/settings. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The name of the object. In this case, default. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The AAD Tenant ID associated with the hierarchy settings. For example, + * 00000000-0000-0000-0000-000000000000 + */ + tenantId?: string; + /** + * Indicates whether RBAC access is required upon group creation under the root Management Group. + * If set to true, user will require Microsoft.Management/managementGroups/write action on the + * root Management Group scope in order to create new Groups directly under the root. This will + * prevent new users from creating new Management Groups, unless they are given access. + */ + requireAuthorizationForGroupCreation?: boolean; + /** + * Settings that sets the default Management Group under which new subscriptions get added in + * this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup + */ + defaultManagementGroup?: string; +} + +/** + * Lists all hierarchy settings. + */ +export interface HierarchySettingsList { + /** + * The list of hierarchy settings. + */ + value?: HierarchySettingsInfo[]; + /** + * The URL to use for getting the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * Parameters for creating or updating Management Group settings + */ +export interface CreateOrUpdateSettingsRequest extends BaseResource { + /** + * Indicates whether RBAC access is required upon group creation under the root Management Group. + * If set to true, user will require Microsoft.Management/managementGroups/write action on the + * root Management Group scope in order to create new Groups directly under the root. This will + * prevent new users from creating new Management Groups, unless they are given access. + */ + requireAuthorizationForGroupCreation?: boolean; + /** + * Settings that sets the default Management Group under which new subscriptions get added in + * this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup + */ + defaultManagementGroup?: string; +} + +/** + * The descendant. + */ +export interface DescendantInfo { + /** + * The fully qualified ID for the descendant. For example, + * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 or + * /subscriptions/0000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The type of the resource. For example, Microsoft.Management/managementGroups or /subscriptions + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The name of the descendant. For example, 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The friendly name of the management group. + */ + displayName?: string; + /** + * Parent. + */ + parent?: DescendantParentGroupInfo; } /** - * @interface - * An interface representing EntityParentGroupInfo. * (Optional) The ID of the parent management group. - * */ export interface EntityParentGroupInfo { /** - * @member {string} [id] The fully qualified ID for the parent management - * group. For example, + * The fully qualified ID for the parent management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 */ id?: string; } /** - * @interface - * An interface representing EntityInfo. * The entity. - * */ export interface EntityInfo { /** - * @member {string} [id] The fully qualified ID for the entity. For example, + * The fully qualified ID for the entity. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [type] The type of the resource. For example, - * /providers/Microsoft.Management/managementGroups - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. For example, Microsoft.Management/managementGroups + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [name] The name of the entity. For example, - * 00000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the entity. For example, 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [tenantId] The AAD Tenant ID associated with the entity. - * For example, 00000000-0000-0000-0000-000000000000 + * The AAD Tenant ID associated with the entity. For example, + * 00000000-0000-0000-0000-000000000000 */ tenantId?: string; /** - * @member {string} [displayName] The friendly name of the management group. + * The friendly name of the management group. */ displayName?: string; /** - * @member {EntityParentGroupInfo} [parent] Parent. + * Parent. */ parent?: EntityParentGroupInfo; /** - * @member {Permissions} [permissions] Permissions. Possible values include: - * 'noaccess', 'view', 'edit', 'delete' + * Permissions. Possible values include: 'noaccess', 'view', 'edit', 'delete' */ permissions?: Permissions; /** - * @member {InheritedPermissions} [inheritedPermissions] Inherited - * Permissions. Possible values include: 'noaccess', 'view', 'edit', 'delete' + * Inherited Permissions. Possible values include: 'noaccess', 'view', 'edit', 'delete' */ inheritedPermissions?: InheritedPermissions; /** - * @member {number} [numberOfDescendants] Number of Descendants. + * Number of Descendants. */ numberOfDescendants?: number; /** - * @member {number} [numberOfChildren] Number of Children. Number of children - * is the number of Groups and Subscriptions that are exactly one level - * underneath the current Group. + * Number of Children. Number of children is the number of Groups and Subscriptions that are + * exactly one level underneath the current Group. */ numberOfChildren?: number; /** - * @member {number} [numberOfChildGroups] Number of Child Groups. Number of - * child groups is the number of Groups that are exactly one level underneath - * the current Group. + * Number of Child Groups. Number of children is the number of Groups that are exactly one level + * underneath the current Group. */ numberOfChildGroups?: number; /** - * @member {string[]} [parentDisplayNameChain] The parent display name chain - * from the root group to the immediate parent + * The parent display name chain from the root group to the immediate parent */ parentDisplayNameChain?: string[]; /** - * @member {string[]} [parentNameChain] The parent name chain from the root - * group to the immediate parent + * The parent name chain from the root group to the immediate parent */ parentNameChain?: string[]; } /** - * @interface - * An interface representing EntityHierarchyItem. * The management group details for the hierarchy view. - * - * @extends BaseResource */ export interface EntityHierarchyItem extends BaseResource { /** - * @member {string} [id] The fully qualified ID for the management group. - * For example, + * The fully qualified ID for the management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [type] The type of the resource. For example, - * /providers/Microsoft.Management/managementGroups - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. For example, Microsoft.Management/managementGroups + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [name] The name of the management group. For example, - * 00000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [displayName] The friendly name of the management group. + * The friendly name of the management group. */ displayName?: string; /** - * @member {Permissions1} [permissions] Permissions. Possible values include: - * 'noaccess', 'view', 'edit', 'delete' + * Permissions. Possible values include: 'noaccess', 'view', 'edit', 'delete' */ permissions?: Permissions1; /** - * @member {EntityHierarchyItem[]} [children] The list of children. + * The list of children. */ children?: EntityHierarchyItem[]; } /** - * @interface - * An interface representing PatchManagementGroupRequest. * Management group patch parameters. - * */ export interface PatchManagementGroupRequest { /** - * @member {string} [displayName] The friendly name of the management group. + * The friendly name of the management group. */ displayName?: string; /** - * @member {string} [parentId] (Optional) The fully qualified ID for the - * parent management group. For example, + * (Optional) The fully qualified ID for the parent management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 */ - parentId?: string; + parentGroupId?: string; } /** - * @interface - * An interface representing CreateParentGroupInfo. * (Optional) The ID of the parent management group used during creation. - * */ export interface CreateParentGroupInfo { /** - * @member {string} [id] The fully qualified ID for the parent management - * group. For example, + * The fully qualified ID for the parent management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 */ id?: string; /** - * @member {string} [name] The name of the parent management group - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the parent management group + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [displayName] The friendly name of the parent management - * group. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The friendly name of the parent management group. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly displayName?: string; } /** - * @interface - * An interface representing CreateManagementGroupDetails. * The details of a management group used during creation. - * */ export interface CreateManagementGroupDetails { /** - * @member {number} [version] The version number of the object. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The version number of the object. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly version?: number; /** - * @member {Date} [updatedTime] The date and time when this object was last - * updated. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The date and time when this object was last updated. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly updatedTime?: Date; /** - * @member {string} [updatedBy] The identity of the principal or process that - * updated the object. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The identity of the principal or process that updated the object. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly updatedBy?: string; /** - * @member {CreateParentGroupInfo} [parent] Parent. + * Parent. */ parent?: CreateParentGroupInfo; } /** - * @interface - * An interface representing CreateManagementGroupChildInfo. * The child information of a management group used during creation. - * */ export interface CreateManagementGroupChildInfo { /** - * @member {Type2} [type] The type of child resource. The fully qualified - * resource type which includes provider namespace (e.g. - * /providers/Microsoft.Management/managementGroups). Possible values - * include: '/providers/Microsoft.Management/managementGroups', - * '/subscriptions' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of child resource. The fully qualified resource type which includes provider + * namespace (e.g. Microsoft.Management/managementGroups). Possible values include: + * 'Microsoft.Management/managementGroups', '/subscriptions' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: Type2; /** - * @member {string} [id] The fully qualified ID for the child resource - * (management group or subscription). For example, - * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The fully qualified ID for the child resource (management group or subscription). For + * example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] The name of the child entity. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the child entity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [displayName] The friendly name of the child resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The friendly name of the child resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly displayName?: string; /** - * @member {string[]} [roles] The roles definitions associated with the - * management group. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly roles?: string[]; - /** - * @member {CreateManagementGroupChildInfo[]} [children] The list of - * children. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The list of children. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly children?: CreateManagementGroupChildInfo[]; } /** - * @interface - * An interface representing CreateManagementGroupRequest. * Management group creation parameters. - * - * @extends BaseResource */ export interface CreateManagementGroupRequest extends BaseResource { /** - * @member {string} [id] The fully qualified ID for the management group. - * For example, + * The fully qualified ID for the management group. For example, * /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [type] The type of the resource. For example, - * /providers/Microsoft.Management/managementGroups - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the resource. For example, Microsoft.Management/managementGroups + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [name] The name of the management group. For example, - * 00000000-0000-0000-0000-000000000000 + * The name of the management group. For example, 00000000-0000-0000-0000-000000000000 */ name?: string; /** - * @member {string} [tenantId] The AAD Tenant ID associated with the - * management group. For example, 00000000-0000-0000-0000-000000000000 - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The AAD Tenant ID associated with the management group. For example, + * 00000000-0000-0000-0000-000000000000 + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tenantId?: string; /** - * @member {string} [displayName] The friendly name of the management group. - * If no value is passed then this field will be set to the groupId. + * The friendly name of the management group. If no value is passed then this field will be set + * to the groupId. */ displayName?: string; /** - * @member {string[]} [roles] The roles definitions associated with the - * management group. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly roles?: string[]; - /** - * @member {CreateManagementGroupDetails} [details] Details. + * Details. */ details?: CreateManagementGroupDetails; /** - * @member {CreateManagementGroupChildInfo[]} [children] The list of - * children. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The list of children. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly children?: CreateManagementGroupChildInfo[]; } /** - * @interface - * An interface representing CheckNameAvailabilityRequest. * Management group name availability check parameters. - * */ export interface CheckNameAvailabilityRequest { /** - * @member {string} [name] the name to check for availability + * the name to check for availability */ name?: string; /** - * @member {Type} [type] fully qualified resource type which includes - * provider namespace. Possible values include: - * '/providers/Microsoft.Management/managementGroups' + * fully qualified resource type which includes provider namespace. Possible values include: + * 'Microsoft.Management/managementGroups' */ type?: Type; } /** - * @interface - * An interface representing ManagementGroupsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ManagementGroupsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; /** - * @member {string} [skiptoken] Page continuation token is only used if a - * previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will - * include a token parameter that specifies a starting point to use for - * subsequent calls. + * Page continuation token is only used if a previous operation returned a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a token parameter that specifies a starting point to use for subsequent calls. */ skiptoken?: string; } /** - * @interface - * An interface representing ManagementGroupsGetOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ManagementGroupsGetOptionalParams extends msRest.RequestOptionsBase { /** - * @member {Expand} [expand] The $expand=children query string parameter - * allows clients to request inclusion of children in the response payload. - * Possible values include: 'children' + * The $expand=children query string parameter allows clients to request inclusion of children in + * the response payload. $expand=path includes the path from the root group to the current + * group. $expand=ancestors includes the ancestor Ids of the current group. Possible values + * include: 'children', 'path', 'ancestors' */ expand?: Expand; /** - * @member {boolean} [recurse] 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. + * 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. */ recurse?: boolean; /** - * @member {string} [filter] A filter which allows the exclusion of - * subscriptions from results (i.e. '$filter=children.childType ne - * Subscription') + * A filter which allows the exclusion of subscriptions from results (i.e. + * '$filter=children.childType ne Subscription') */ filter?: string; /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; } /** - * @interface - * An interface representing ManagementGroupsCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ManagementGroupsCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; } /** - * @interface - * An interface representing ManagementGroupsUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ManagementGroupsUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; } /** - * @interface - * An interface representing ManagementGroupsDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ManagementGroupsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; } /** - * @interface - * An interface representing ManagementGroupsBeginCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ManagementGroupsBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface ManagementGroupsGetDescendantsOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Page continuation token is only used if a previous operation returned a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a token parameter that specifies a starting point to use for subsequent calls. */ - cacheControl?: string; + skiptoken?: string; + /** + * Number of elements to return when retrieving results. Passing this in will override + * $skipToken. + */ + top?: number; } /** - * @interface - * An interface representing ManagementGroupsBeginDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ManagementGroupsBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { +export interface ManagementGroupsBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; } /** - * @interface - * An interface representing ManagementGroupsListNextOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ManagementGroupsListNextOptionalParams extends msRest.RequestOptionsBase { +export interface ManagementGroupsBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; } /** - * @interface - * An interface representing ManagementGroupSubscriptionsCreateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ManagementGroupSubscriptionsCreateOptionalParams extends msRest.RequestOptionsBase { +export interface ManagementGroupsListNextOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; + /** + * Page continuation token is only used if a previous operation returned a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a token parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; } /** - * @interface - * An interface representing ManagementGroupSubscriptionsDeleteMethodOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface ManagementGroupSubscriptionsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { +export interface ManagementGroupsGetDescendantsNextOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Page continuation token is only used if a previous operation returned a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a token parameter that specifies a starting point to use for subsequent calls. */ - cacheControl?: string; + skiptoken?: string; + /** + * Number of elements to return when retrieving results. Passing this in will override + * $skipToken. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ManagementGroupSubscriptionsCreateOptionalParams extends msRest.RequestOptionsBase { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. + */ + cacheControl?: string; +} + +/** + * Optional Parameters. + */ +export interface ManagementGroupSubscriptionsDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. + */ + cacheControl?: string; +} + +/** + * Optional Parameters. + */ +export interface ManagementGroupSubscriptionsGetSubscriptionOptionalParams extends msRest.RequestOptionsBase { + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. + */ + cacheControl?: string; +} + +/** + * Optional Parameters. + */ +export interface ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupOptionalParams extends msRest.RequestOptionsBase { + /** + * Page continuation token is only used if a previous operation returned a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a token parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; +} + +/** + * Optional Parameters. + */ +export interface ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * Page continuation token is only used if a previous operation returned a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a token parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; } /** - * @interface - * An interface representing EntitiesListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface EntitiesListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [skiptoken] Page continuation token is only used if a - * previous operation returned a partial result. If a previous response - * contains a nextLink element, the value of the nextLink element will - * include a token parameter that specifies a starting point to use for - * subsequent calls. + * Page continuation token is only used if a previous operation returned a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a token parameter that specifies a starting point to use for subsequent calls. */ skiptoken?: string; /** - * @member {number} [skip] Number of entities to skip over when retrieving - * results. Passing this in will override $skipToken. + * Number of entities to skip over when retrieving results. Passing this in will override + * $skipToken. */ skip?: number; /** - * @member {number} [top] Number of elements to return when retrieving - * results. Passing this in will override $skipToken. + * Number of elements to return when retrieving results. Passing this in will override + * $skipToken. */ top?: number; /** - * @member {string} [select] This parameter specifies the fields to include - * in the response. Can include any combination of + * This parameter specifies the fields to include in the response. Can include any combination of * Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. - * '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. - * When specified the $select parameter can override select in $skipToken. + * '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the + * $select parameter can override select in $skipToken. */ select?: string; /** - * @member {Search} [search] The $search parameter is used in conjunction - * with the $filter parameter to return three different outputs depending on - * the parameter passed in. With $search=AllowedParents the API will return - * the entity info of all groups that the requested entity will be able to - * reparent to as determined by the user's permissions. With - * $search=AllowedChildren the API will return the entity info of all - * entities that can be added as children of the requested entity. With - * $search=ParentAndFirstLevelChildren the API will return the parent and - * first level of children that the user has either direct access to or - * indirect access via one of their descendants. Possible values include: - * 'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren', - * 'ParentOnly', 'ChildrenOnly' + * The $search parameter is used in conjunction with the $filter parameter to return three + * different outputs depending on the parameter passed in. + * With $search=AllowedParents the API will return the entity info of all groups that the + * requested entity will be able to reparent to as determined by the user's permissions. + * With $search=AllowedChildren the API will return the entity info of all entities that can be + * added as children of the requested entity. + * With $search=ParentAndFirstLevelChildren the API will return the parent and first level of + * children that the user has either direct access to or indirect access via one of their + * descendants. + * With $search=ParentOnly the API will return only the group if the user has access to at least + * one of the descendants of the group. + * With $search=ChildrenOnly the API will return only the first level of children of the group + * entity info specified in $filter. The user must have direct access to the children entities + * or one of it's descendants for it to show up in the results. Possible values include: + * 'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren', 'ParentOnly', + * 'ChildrenOnly' */ search?: Search; /** - * @member {string} [filter] The filter parameter allows you to filter on the - * the name or display name fields. You can check for equality on the name - * field (e.g. name eq '{entityName}') and you can check for substrings on - * either the name or display name fields(e.g. contains(name, - * '{substringToSearch}'), contains(displayName, '{substringToSearch')). Note - * that the '{entityName}' and '{substringToSearch}' fields are checked case - * insensitively. + * The filter parameter allows you to filter on the the name or display name fields. You can + * check for equality on the name field (e.g. name eq '{entityName}') and you can check for + * substrings on either the name or display name fields(e.g. contains(name, + * '{substringToSearch}'), contains(displayName, '{substringToSearch')). Note that the + * '{entityName}' and '{substringToSearch}' fields are checked case insensitively. */ filter?: string; /** - * @member {View} [view] The view parameter allows clients to filter the type - * of data that is returned by the getEntities call. Possible values include: - * 'FullHierarchy', 'GroupsOnly', 'SubscriptionsOnly', 'Audit' + * The view parameter allows clients to filter the type of data that is returned by the + * getEntities call. Possible values include: 'FullHierarchy', 'GroupsOnly', 'SubscriptionsOnly', + * 'Audit' */ view?: View; /** - * @member {string} [groupName] A filter which allows the get entities call - * to focus on a particular group (i.e. "$filter=name eq 'groupName'") + * A filter which allows the get entities call to focus on a particular group (i.e. "$filter=name + * eq 'groupName'") */ groupName?: string; /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; } /** - * @interface - * An interface representing EntitiesListNextOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface EntitiesListNextOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [cacheControl] Indicates that the request shouldn't - * utilize any caches. Default value: 'no-cache' . + * Page continuation token is only used if a previous operation returned a partial result. + * If a previous response contains a nextLink element, the value of the nextLink element will + * include a token parameter that specifies a starting point to use for subsequent calls. + */ + skiptoken?: string; + /** + * Number of entities to skip over when retrieving results. Passing this in will override + * $skipToken. + */ + skip?: number; + /** + * Number of elements to return when retrieving results. Passing this in will override + * $skipToken. + */ + top?: number; + /** + * This parameter specifies the fields to include in the response. Can include any combination of + * Name,DisplayName,Type,ParentDisplayNameChain,ParentChain, e.g. + * '$select=Name,DisplayName,Type,ParentDisplayNameChain,ParentNameChain'. When specified the + * $select parameter can override select in $skipToken. + */ + select?: string; + /** + * The $search parameter is used in conjunction with the $filter parameter to return three + * different outputs depending on the parameter passed in. + * With $search=AllowedParents the API will return the entity info of all groups that the + * requested entity will be able to reparent to as determined by the user's permissions. + * With $search=AllowedChildren the API will return the entity info of all entities that can be + * added as children of the requested entity. + * With $search=ParentAndFirstLevelChildren the API will return the parent and first level of + * children that the user has either direct access to or indirect access via one of their + * descendants. + * With $search=ParentOnly the API will return only the group if the user has access to at least + * one of the descendants of the group. + * With $search=ChildrenOnly the API will return only the first level of children of the group + * entity info specified in $filter. The user must have direct access to the children entities + * or one of it's descendants for it to show up in the results. Possible values include: + * 'AllowedParents', 'AllowedChildren', 'ParentAndFirstLevelChildren', 'ParentOnly', + * 'ChildrenOnly' + */ + search?: Search; + /** + * The filter parameter allows you to filter on the the name or display name fields. You can + * check for equality on the name field (e.g. name eq '{entityName}') and you can check for + * substrings on either the name or display name fields(e.g. contains(name, + * '{substringToSearch}'), contains(displayName, '{substringToSearch')). Note that the + * '{entityName}' and '{substringToSearch}' fields are checked case insensitively. + */ + filter?: string; + /** + * The view parameter allows clients to filter the type of data that is returned by the + * getEntities call. Possible values include: 'FullHierarchy', 'GroupsOnly', 'SubscriptionsOnly', + * 'Audit' + */ + view?: View; + /** + * A filter which allows the get entities call to focus on a particular group (i.e. "$filter=name + * eq 'groupName'") + */ + groupName?: string; + /** + * Indicates whether the request should utilize any caches. Populate the header with 'no-cache' + * value to bypass existing caches. Default value: 'no-cache'. */ cacheControl?: string; } /** - * @interface * An interface representing ManagementGroupsAPIOptions. - * @extends AzureServiceClientOptions */ export interface ManagementGroupsAPIOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for CreateOrUpdate operation. + */ +export interface ManagementGroupsCreateOrUpdateHeaders { /** - * @member {string} [baseUri] + * URL for determining when an operation has completed. Send a GET request to the URL in Location + * header. + * The URI should return a 202 until the operation reaches a terminal state and 200 once it + * reaches a terminal state. + * + * For more info: + * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers */ - baseUri?: string; + location: string; + /** + * URL for checking the ongoing status of the operation. + * To get the status of the asynchronous operation, send a GET request to the URL in + * Azure-AsyncOperation header value. + * + * For more info: + * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations + */ + azureAsyncOperation: string; } +/** + * Defines headers for Delete operation. + */ +export interface ManagementGroupsDeleteHeaders { + /** + * URL for determining when an operation has completed. Send a GET request to the URL in Location + * header. + * The URI should return a 202 until the operation reaches a terminal state and 200 once it + * reaches a terminal state. + * + * For more info: + * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#202-accepted-and-location-headers + */ + location: string; + /** + * URL for checking the ongoing status of the operation. + * To get the status of the asynchronous operation, send a GET request to the URL in + * Azure-AsyncOperation header value. + * + * For more info: + * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#asynchronous-operations + */ + azureAsyncOperation: string; +} /** * @interface - * An interface representing the ManagementGroupListResult. * Describes the result of the request to list management groups. - * * @extends Array */ export interface ManagementGroupListResult extends Array { /** - * @member {string} [nextLink] The URL to use for getting the next set of - * results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The URL to use for getting the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * Describes the result of the request to view descendants. + * @extends Array + */ +export interface DescendantListResult extends Array { + /** + * The URL to use for getting the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The details of all subscriptions under management group. + * @extends Array + */ +export interface ListSubscriptionUnderManagementGroup extends Array { + /** + * The URL to use for getting the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the OperationListResult. * Describes the result of the request to list Microsoft.Management operations. - * * @extends Array */ export interface OperationListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * URL to get the next set of operation list results if there are any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } /** * @interface - * An interface representing the EntityListResult. * Describes the result of the request to view entities. - * * @extends Array */ export interface EntityListResult extends Array { /** - * @member {number} [count] Total count of records that match the filter - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Total count of records that match the filter + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly count?: number; /** - * @member {string} [nextLink] The URL to use for getting the next set of - * results. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The URL to use for getting the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } @@ -1093,27 +1313,19 @@ export type Status = 'NotStarted' | 'NotStartedButGroupsExist' | 'Started' | 'Fa /** * Defines values for Type. - * Possible values include: '/providers/Microsoft.Management/managementGroups' + * Possible values include: 'Microsoft.Management/managementGroups' * @readonly * @enum {string} */ -export type Type = '/providers/Microsoft.Management/managementGroups'; +export type Type = 'Microsoft.Management/managementGroups'; /** * Defines values for Type1. - * Possible values include: '/providers/Microsoft.Management/managementGroups', '/subscriptions' + * Possible values include: 'Microsoft.Management/managementGroups', '/subscriptions' * @readonly * @enum {string} */ -export type Type1 = '/providers/Microsoft.Management/managementGroups' | '/subscriptions'; - -/** - * Defines values for ProvisioningState. - * Possible values include: 'Updating' - * @readonly - * @enum {string} - */ -export type ProvisioningState = 'Updating'; +export type Type1 = 'Microsoft.Management/managementGroups' | '/subscriptions'; /** * Defines values for Permissions. @@ -1141,19 +1353,19 @@ export type Permissions1 = 'noaccess' | 'view' | 'edit' | 'delete'; /** * Defines values for Type2. - * Possible values include: '/providers/Microsoft.Management/managementGroups', '/subscriptions' + * Possible values include: 'Microsoft.Management/managementGroups', '/subscriptions' * @readonly * @enum {string} */ -export type Type2 = '/providers/Microsoft.Management/managementGroups' | '/subscriptions'; +export type Type2 = 'Microsoft.Management/managementGroups' | '/subscriptions'; /** * Defines values for Expand. - * Possible values include: 'children' + * Possible values include: 'children', 'path', 'ancestors' * @readonly * @enum {string} */ -export type Expand = 'children'; +export type Expand = 'children' | 'path' | 'ancestors'; /** * Defines values for Search. @@ -1184,6 +1396,7 @@ export type ManagementGroupsListResponse = ManagementGroupListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1203,6 +1416,7 @@ export type ManagementGroupsGetResponse = ManagementGroup & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1213,19 +1427,26 @@ export type ManagementGroupsGetResponse = ManagementGroup & { /** * Contains response data for the createOrUpdate operation. */ -export type ManagementGroupsCreateOrUpdateResponse = { +export type ManagementGroupsCreateOrUpdateResponse = ManagementGroupsCreateOrUpdateHeaders & { /** * The parsed response body. */ body: any; + /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ManagementGroupsCreateOrUpdateHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1245,6 +1466,7 @@ export type ManagementGroupsUpdateResponse = ManagementGroup & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1255,30 +1477,52 @@ export type ManagementGroupsUpdateResponse = ManagementGroup & { /** * Contains response data for the deleteMethod operation. */ -export type ManagementGroupsDeleteMethodResponse = OperationResults & { +export type ManagementGroupsDeleteResponse = AzureAsyncOperationResults & ManagementGroupsDeleteHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: ManagementGroupsDeleteHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationResults; + parsedBody: AzureAsyncOperationResults; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the getDescendants operation. */ -export type ManagementGroupsBeginCreateOrUpdateResponse = { +export type ManagementGroupsGetDescendantsResponse = DescendantListResult & { /** - * The parsed response body. + * The underlying HTTP response. */ - body: any; + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DescendantListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type ManagementGroupsListNextResponse = ManagementGroupListResult & { /** * The underlying HTTP response. */ @@ -1287,17 +1531,18 @@ export type ManagementGroupsBeginCreateOrUpdateResponse = { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: any; + parsedBody: ManagementGroupListResult; }; }; /** - * Contains response data for the beginDeleteMethod operation. + * Contains response data for the getDescendantsNext operation. */ -export type ManagementGroupsBeginDeleteMethodResponse = OperationResults & { +export type ManagementGroupsGetDescendantsNextResponse = DescendantListResult & { /** * The underlying HTTP response. */ @@ -1306,17 +1551,18 @@ export type ManagementGroupsBeginDeleteMethodResponse = OperationResults & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationResults; + parsedBody: DescendantListResult; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the create operation. */ -export type ManagementGroupsListNextResponse = ManagementGroupListResult & { +export type ManagementGroupSubscriptionsCreateResponse = SubscriptionUnderManagementGroup & { /** * The underlying HTTP response. */ @@ -1325,10 +1571,151 @@ export type ManagementGroupsListNextResponse = ManagementGroupListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: ManagementGroupListResult; + parsedBody: SubscriptionUnderManagementGroup; + }; +}; + +/** + * Contains response data for the getSubscription operation. + */ +export type ManagementGroupSubscriptionsGetSubscriptionResponse = SubscriptionUnderManagementGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SubscriptionUnderManagementGroup; + }; +}; + +/** + * Contains response data for the getSubscriptionsUnderManagementGroup operation. + */ +export type ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupResponse = ListSubscriptionUnderManagementGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListSubscriptionUnderManagementGroup; + }; +}; + +/** + * Contains response data for the getSubscriptionsUnderManagementGroupNext operation. + */ +export type ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupNextResponse = ListSubscriptionUnderManagementGroup & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ListSubscriptionUnderManagementGroup; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type HierarchySettingsListResponse = HierarchySettingsList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HierarchySettingsList; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type HierarchySettingsGetResponse = HierarchySettings & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HierarchySettings; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type HierarchySettingsCreateOrUpdateResponse = HierarchySettings & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HierarchySettings; + }; +}; + +/** + * Contains response data for the update operation. + */ +export type HierarchySettingsUpdateResponse = HierarchySettings & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: HierarchySettings; }; }; @@ -1344,6 +1731,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1363,6 +1751,7 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1382,6 +1771,7 @@ export type CheckNameAvailabilityResponse = CheckNameAvailabilityResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1401,6 +1791,7 @@ export type StartTenantBackfillResponse = TenantBackfillStatusResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1420,6 +1811,7 @@ export type TenantBackfillStatusResponse = TenantBackfillStatusResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1439,6 +1831,7 @@ export type EntitiesListResponse = EntityListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1458,6 +1851,7 @@ export type EntitiesListNextResponse = EntityListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/managementgroups/arm-managementgroups/src/models/managementGroupSubscriptionsMappers.ts b/sdk/managementgroups/arm-managementgroups/src/models/managementGroupSubscriptionsMappers.ts index 35f35a16b138..3a9631b15a44 100644 --- a/sdk/managementgroups/arm-managementgroups/src/models/managementGroupSubscriptionsMappers.ts +++ b/sdk/managementgroups/arm-managementgroups/src/models/managementGroupSubscriptionsMappers.ts @@ -1,15 +1,28 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + BaseResource, + CreateManagementGroupChildInfo, + CreateManagementGroupDetails, + CreateManagementGroupRequest, + CreateOrUpdateSettingsRequest, + CreateParentGroupInfo, + DescendantParentGroupInfo, + EntityHierarchyItem, + ErrorDetails, ErrorResponse, - ErrorDetails + HierarchySettings, + ListSubscriptionUnderManagementGroup, + ManagementGroup, + ManagementGroupChildInfo, + ManagementGroupDetails, + ManagementGroupPathElement, + ParentGroupInfo, + SubscriptionUnderManagementGroup } from "../models/mappers"; - diff --git a/sdk/managementgroups/arm-managementgroups/src/models/managementGroupsMappers.ts b/sdk/managementgroups/arm-managementgroups/src/models/managementGroupsMappers.ts index 6de4971d1994..b265b4763f30 100644 --- a/sdk/managementgroups/arm-managementgroups/src/models/managementGroupsMappers.ts +++ b/sdk/managementgroups/arm-managementgroups/src/models/managementGroupsMappers.ts @@ -1,29 +1,35 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - ManagementGroupListResult, - ManagementGroupInfo, - ErrorResponse, + AzureAsyncOperationResults, + BaseResource, + CreateManagementGroupChildInfo, + CreateManagementGroupDetails, + CreateManagementGroupRequest, + CreateOrUpdateSettingsRequest, + CreateParentGroupInfo, + DescendantInfo, + DescendantListResult, + DescendantParentGroupInfo, + EntityHierarchyItem, ErrorDetails, + ErrorResponse, + HierarchySettings, ManagementGroup, - BaseResource, + ManagementGroupChildInfo, ManagementGroupDetails, + ManagementGroupInfo, + ManagementGroupListResult, + ManagementGroupPathElement, + ManagementGroupsCreateOrUpdateHeaders, + ManagementGroupsDeleteHeaders, ParentGroupInfo, - ManagementGroupChildInfo, - CreateManagementGroupRequest, - CreateManagementGroupDetails, - CreateParentGroupInfo, - CreateManagementGroupChildInfo, - OperationResults, PatchManagementGroupRequest, - EntityHierarchyItem + SubscriptionUnderManagementGroup } from "../models/mappers"; - diff --git a/sdk/managementgroups/arm-managementgroups/src/models/mappers.ts b/sdk/managementgroups/arm-managementgroups/src/models/mappers.ts index 4526d490119f..9c8fa4d2e97c 100644 --- a/sdk/managementgroups/arm-managementgroups/src/models/mappers.ts +++ b/sdk/managementgroups/arm-managementgroups/src/models/mappers.ts @@ -1,11 +1,9 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -231,6 +229,79 @@ export const ManagementGroupInfo: msRest.CompositeMapper = { } }; +export const DescendantParentGroupInfo: msRest.CompositeMapper = { + serializedName: "DescendantParentGroupInfo", + type: { + name: "Composite", + className: "DescendantParentGroupInfo", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const SubscriptionUnderManagementGroup: msRest.CompositeMapper = { + serializedName: "SubscriptionUnderManagementGroup", + type: { + name: "Composite", + className: "SubscriptionUnderManagementGroup", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + tenant: { + serializedName: "properties.tenant", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + parent: { + nullable: true, + serializedName: "properties.parent", + type: { + name: "Composite", + className: "DescendantParentGroupInfo" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "String" + } + } + } + } +}; + export const ParentGroupInfo: msRest.CompositeMapper = { serializedName: "ParentGroupInfo", type: { @@ -259,6 +330,28 @@ export const ParentGroupInfo: msRest.CompositeMapper = { } }; +export const ManagementGroupPathElement: msRest.CompositeMapper = { + serializedName: "ManagementGroupPathElement", + type: { + name: "Composite", + className: "ManagementGroupPathElement", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + } + } + } +}; + export const ManagementGroupDetails: msRest.CompositeMapper = { serializedName: "ManagementGroupDetails", type: { @@ -289,6 +382,44 @@ export const ManagementGroupDetails: msRest.CompositeMapper = { name: "Composite", className: "ParentGroupInfo" } + }, + path: { + nullable: true, + serializedName: "path", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagementGroupPathElement" + } + } + } + }, + managementGroupAncestors: { + nullable: true, + serializedName: "managementGroupAncestors", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + managementGroupAncestorsChain: { + nullable: true, + serializedName: "managementGroupAncestorsChain", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagementGroupPathElement" + } + } + } } } } @@ -324,17 +455,6 @@ export const ManagementGroupChildInfo: msRest.CompositeMapper = { name: "String" } }, - roles: { - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, children: { serializedName: "children", type: { @@ -390,18 +510,6 @@ export const ManagementGroup: msRest.CompositeMapper = { name: "String" } }, - roles: { - nullable: true, - serializedName: "properties.roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, details: { serializedName: "properties.details", type: { @@ -453,8 +561,113 @@ export const OperationResults: msRest.CompositeMapper = { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + tenantId: { + serializedName: "properties.tenantId", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + } + } + } +}; + +export const AzureAsyncOperationResults: msRest.CompositeMapper = { + serializedName: "AzureAsyncOperationResults", + type: { + name: "Composite", + className: "AzureAsyncOperationResults", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + status: { + readOnly: true, + serializedName: "status", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "properties.tenantId", + type: { + name: "String" + } + }, + displayName: { + serializedName: "properties.displayName", + type: { + name: "String" + } + } + } + } +}; + +export const HierarchySettings: msRest.CompositeMapper = { + serializedName: "HierarchySettings", + type: { + name: "Composite", + className: "HierarchySettings", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "properties.tenantId", + type: { + name: "String" + } + }, + requireAuthorizationForGroupCreation: { + serializedName: "properties.requireAuthorizationForGroupCreation", + type: { + name: "Boolean" + } + }, + defaultManagementGroup: { + serializedName: "properties.defaultManagementGroup", type: { name: "String" } @@ -463,6 +676,154 @@ export const OperationResults: msRest.CompositeMapper = { } }; +export const HierarchySettingsInfo: msRest.CompositeMapper = { + serializedName: "HierarchySettingsInfo", + type: { + name: "Composite", + className: "HierarchySettingsInfo", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + tenantId: { + serializedName: "properties.tenantId", + type: { + name: "String" + } + }, + requireAuthorizationForGroupCreation: { + serializedName: "properties.requireAuthorizationForGroupCreation", + type: { + name: "Boolean" + } + }, + defaultManagementGroup: { + serializedName: "properties.defaultManagementGroup", + type: { + name: "String" + } + } + } + } +}; + +export const HierarchySettingsList: msRest.CompositeMapper = { + serializedName: "HierarchySettingsList", + type: { + name: "Composite", + className: "HierarchySettingsList", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HierarchySettingsInfo" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const CreateOrUpdateSettingsRequest: msRest.CompositeMapper = { + serializedName: "CreateOrUpdateSettingsRequest", + type: { + name: "Composite", + className: "CreateOrUpdateSettingsRequest", + modelProperties: { + requireAuthorizationForGroupCreation: { + serializedName: "properties.requireAuthorizationForGroupCreation", + type: { + name: "Boolean" + } + }, + defaultManagementGroup: { + serializedName: "properties.defaultManagementGroup", + type: { + name: "String" + } + } + } + } +}; + +export const DescendantInfo: msRest.CompositeMapper = { + serializedName: "DescendantInfo", + type: { + name: "Composite", + className: "DescendantInfo", + modelProperties: { + id: { + nullable: true, + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + type: { + nullable: true, + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + nullable: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + parent: { + nullable: true, + serializedName: "properties.parent", + type: { + name: "Composite", + className: "DescendantParentGroupInfo" + } + } + } + } +}; + export const EntityParentGroupInfo: msRest.CompositeMapper = { serializedName: "EntityParentGroupInfo", type: { @@ -660,9 +1021,9 @@ export const PatchManagementGroupRequest: msRest.CompositeMapper = { name: "String" } }, - parentId: { + parentGroupId: { nullable: true, - serializedName: "parentId", + serializedName: "parentGroupId", type: { name: "String" } @@ -773,18 +1134,6 @@ export const CreateManagementGroupChildInfo: msRest.CompositeMapper = { name: "String" } }, - roles: { - readOnly: true, - serializedName: "roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, children: { readOnly: true, serializedName: "children", @@ -842,19 +1191,6 @@ export const CreateManagementGroupRequest: msRest.CompositeMapper = { name: "String" } }, - roles: { - nullable: true, - readOnly: true, - serializedName: "properties.roles", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, details: { serializedName: "properties.details", type: { @@ -897,7 +1233,7 @@ export const CheckNameAvailabilityRequest: msRest.CompositeMapper = { type: { name: "Enum", allowedValues: [ - "/providers/Microsoft.Management/managementGroups" + "Microsoft.Management/managementGroups" ] } } @@ -905,6 +1241,50 @@ export const CheckNameAvailabilityRequest: msRest.CompositeMapper = { } }; +export const ManagementGroupsCreateOrUpdateHeaders: msRest.CompositeMapper = { + serializedName: "managementgroups-createorupdate-headers", + type: { + name: "Composite", + className: "ManagementGroupsCreateOrUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ManagementGroupsDeleteHeaders: msRest.CompositeMapper = { + serializedName: "managementgroups-delete-headers", + type: { + name: "Composite", + className: "ManagementGroupsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export const ManagementGroupListResult: msRest.CompositeMapper = { serializedName: "ManagementGroupListResult", type: { @@ -934,6 +1314,64 @@ export const ManagementGroupListResult: msRest.CompositeMapper = { } }; +export const DescendantListResult: msRest.CompositeMapper = { + serializedName: "DescendantListResult", + type: { + name: "Composite", + className: "DescendantListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DescendantInfo" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ListSubscriptionUnderManagementGroup: msRest.CompositeMapper = { + serializedName: "ListSubscriptionUnderManagementGroup", + type: { + name: "Composite", + className: "ListSubscriptionUnderManagementGroup", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SubscriptionUnderManagementGroup" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { diff --git a/sdk/managementgroups/arm-managementgroups/src/models/operationsMappers.ts b/sdk/managementgroups/arm-managementgroups/src/models/operationsMappers.ts index 16e1a0a23e0f..b151669c9e11 100644 --- a/sdk/managementgroups/arm-managementgroups/src/models/operationsMappers.ts +++ b/sdk/managementgroups/arm-managementgroups/src/models/operationsMappers.ts @@ -1,18 +1,15 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + ErrorDetails, + ErrorResponse, Operation, OperationDisplayProperties, - ErrorResponse, - ErrorDetails + OperationListResult } from "../models/mappers"; - diff --git a/sdk/managementgroups/arm-managementgroups/src/models/parameters.ts b/sdk/managementgroups/arm-managementgroups/src/models/parameters.ts index c94a3fc9c620..9df11ffdb0f0 100644 --- a/sdk/managementgroups/arm-managementgroups/src/models/parameters.ts +++ b/sdk/managementgroups/arm-managementgroups/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/managementgroups/arm-managementgroups/src/operations/entities.ts b/sdk/managementgroups/arm-managementgroups/src/operations/entities.ts index c9f41620be8c..288b3cfc2607 100644 --- a/sdk/managementgroups/arm-managementgroups/src/operations/entities.ts +++ b/sdk/managementgroups/arm-managementgroups/src/operations/entities.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -117,6 +116,17 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skiptoken, + Parameters.skip, + Parameters.top, + Parameters.select, + Parameters.search, + Parameters.filter, + Parameters.view, + Parameters.groupName + ], headerParameters: [ Parameters.cacheControl, Parameters.acceptLanguage diff --git a/sdk/managementgroups/arm-managementgroups/src/operations/hierarchySettingsOperations.ts b/sdk/managementgroups/arm-managementgroups/src/operations/hierarchySettingsOperations.ts new file mode 100644 index 000000000000..ee7e47864d33 --- /dev/null +++ b/sdk/managementgroups/arm-managementgroups/src/operations/hierarchySettingsOperations.ts @@ -0,0 +1,306 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/hierarchySettingsOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { ManagementGroupsAPIContext } from "../managementGroupsAPIContext"; + +/** Class representing a HierarchySettingsOperations. */ +export class HierarchySettingsOperations { + private readonly client: ManagementGroupsAPIContext; + + /** + * Create a HierarchySettingsOperations. + * @param {ManagementGroupsAPIContext} client Reference to the service client. + */ + constructor(client: ManagementGroupsAPIContext) { + this.client = client; + } + + /** + * Gets all the hierarchy settings defined at the Management Group level. Settings can only be set + * on the root Management Group of the hierarchy. + * @param groupId Management Group ID. + * @param [options] The optional parameters + * @returns Promise + */ + list(groupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupId Management Group ID. + * @param callback The callback + */ + list(groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param groupId Management Group ID. + * @param options The optional parameters + * @param callback The callback + */ + list(groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupId, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets the hierarchy settings defined at the Management Group level. Settings can only be set on + * the root Management Group of the hierarchy. + * @param groupId Management Group ID. + * @param [options] The optional parameters + * @returns Promise + */ + get(groupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupId Management Group ID. + * @param callback The callback + */ + get(groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param groupId Management Group ID. + * @param options The optional parameters + * @param callback The callback + */ + get(groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Creates or updates the hierarchy settings defined at the Management Group level. + * @param groupId Management Group ID. + * @param createTenantSettingsRequest Tenant level settings request parameter. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(groupId: string, createTenantSettingsRequest: Models.CreateOrUpdateSettingsRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupId Management Group ID. + * @param createTenantSettingsRequest Tenant level settings request parameter. + * @param callback The callback + */ + createOrUpdate(groupId: string, createTenantSettingsRequest: Models.CreateOrUpdateSettingsRequest, callback: msRest.ServiceCallback): void; + /** + * @param groupId Management Group ID. + * @param createTenantSettingsRequest Tenant level settings request parameter. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(groupId: string, createTenantSettingsRequest: Models.CreateOrUpdateSettingsRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(groupId: string, createTenantSettingsRequest: Models.CreateOrUpdateSettingsRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupId, + createTenantSettingsRequest, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Updates the hierarchy settings defined at the Management Group level. + * @param groupId Management Group ID. + * @param createTenantSettingsRequest Tenant level settings request parameter. + * @param [options] The optional parameters + * @returns Promise + */ + update(groupId: string, createTenantSettingsRequest: Models.CreateOrUpdateSettingsRequest, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupId Management Group ID. + * @param createTenantSettingsRequest Tenant level settings request parameter. + * @param callback The callback + */ + update(groupId: string, createTenantSettingsRequest: Models.CreateOrUpdateSettingsRequest, callback: msRest.ServiceCallback): void; + /** + * @param groupId Management Group ID. + * @param createTenantSettingsRequest Tenant level settings request parameter. + * @param options The optional parameters + * @param callback The callback + */ + update(groupId: string, createTenantSettingsRequest: Models.CreateOrUpdateSettingsRequest, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(groupId: string, createTenantSettingsRequest: Models.CreateOrUpdateSettingsRequest, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupId, + createTenantSettingsRequest, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Deletes the hierarchy settings defined at the Management Group level. + * @param groupId Management Group ID. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(groupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param groupId Management Group ID. + * @param callback The callback + */ + deleteMethod(groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param groupId Management Group ID. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupId, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Management/managementGroups/{groupId}/settings", + urlParameters: [ + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HierarchySettingsList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Management/managementGroups/{groupId}/settings/default", + urlParameters: [ + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.HierarchySettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "providers/Microsoft.Management/managementGroups/{groupId}/settings/default", + urlParameters: [ + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "createTenantSettingsRequest", + mapper: { + ...Mappers.CreateOrUpdateSettingsRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.HierarchySettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "providers/Microsoft.Management/managementGroups/{groupId}/settings/default", + urlParameters: [ + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "createTenantSettingsRequest", + mapper: { + ...Mappers.CreateOrUpdateSettingsRequest, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.HierarchySettings + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "providers/Microsoft.Management/managementGroups/{groupId}/settings/default", + urlParameters: [ + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/managementgroups/arm-managementgroups/src/operations/index.ts b/sdk/managementgroups/arm-managementgroups/src/operations/index.ts index 9712e3b21827..0b499efe0939 100644 --- a/sdk/managementgroups/arm-managementgroups/src/operations/index.ts +++ b/sdk/managementgroups/arm-managementgroups/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -10,5 +9,6 @@ export * from "./managementGroups"; export * from "./managementGroupSubscriptions"; +export * from "./hierarchySettingsOperations"; export * from "./operations"; export * from "./entities"; diff --git a/sdk/managementgroups/arm-managementgroups/src/operations/managementGroupSubscriptions.ts b/sdk/managementgroups/arm-managementgroups/src/operations/managementGroupSubscriptions.ts index bc93eaddafa2..9f0cc5ce8d0b 100644 --- a/sdk/managementgroups/arm-managementgroups/src/operations/managementGroupSubscriptions.ts +++ b/sdk/managementgroups/arm-managementgroups/src/operations/managementGroupSubscriptions.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -31,23 +30,23 @@ export class ManagementGroupSubscriptions { * @param groupId Management Group ID. * @param subscriptionId Subscription ID. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - create(groupId: string, subscriptionId: string, options?: Models.ManagementGroupSubscriptionsCreateOptionalParams): Promise; + create(groupId: string, subscriptionId: string, options?: Models.ManagementGroupSubscriptionsCreateOptionalParams): Promise; /** * @param groupId Management Group ID. * @param subscriptionId Subscription ID. * @param callback The callback */ - create(groupId: string, subscriptionId: string, callback: msRest.ServiceCallback): void; + create(groupId: string, subscriptionId: string, callback: msRest.ServiceCallback): void; /** * @param groupId Management Group ID. * @param subscriptionId Subscription ID. * @param options The optional parameters * @param callback The callback */ - create(groupId: string, subscriptionId: string, options: Models.ManagementGroupSubscriptionsCreateOptionalParams, callback: msRest.ServiceCallback): void; - create(groupId: string, subscriptionId: string, options?: Models.ManagementGroupSubscriptionsCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + create(groupId: string, subscriptionId: string, options: Models.ManagementGroupSubscriptionsCreateOptionalParams, callback: msRest.ServiceCallback): void; + create(groupId: string, subscriptionId: string, options?: Models.ManagementGroupSubscriptionsCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { groupId, @@ -55,7 +54,7 @@ export class ManagementGroupSubscriptions { options }, createOperationSpec, - callback); + callback) as Promise; } /** @@ -89,6 +88,96 @@ export class ManagementGroupSubscriptions { deleteMethodOperationSpec, callback); } + + /** + * Retrieves details about given subscription which is associated with the management group. + * @param groupId Management Group ID. + * @param subscriptionId Subscription ID. + * @param [options] The optional parameters + * @returns Promise + */ + getSubscription(groupId: string, subscriptionId: string, options?: Models.ManagementGroupSubscriptionsGetSubscriptionOptionalParams): Promise; + /** + * @param groupId Management Group ID. + * @param subscriptionId Subscription ID. + * @param callback The callback + */ + getSubscription(groupId: string, subscriptionId: string, callback: msRest.ServiceCallback): void; + /** + * @param groupId Management Group ID. + * @param subscriptionId Subscription ID. + * @param options The optional parameters + * @param callback The callback + */ + getSubscription(groupId: string, subscriptionId: string, options: Models.ManagementGroupSubscriptionsGetSubscriptionOptionalParams, callback: msRest.ServiceCallback): void; + getSubscription(groupId: string, subscriptionId: string, options?: Models.ManagementGroupSubscriptionsGetSubscriptionOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupId, + subscriptionId, + options + }, + getSubscriptionOperationSpec, + callback) as Promise; + } + + /** + * Retrieves details about all subscriptions which are associated with the management group. + * @param groupId Management Group ID. + * @param [options] The optional parameters + * @returns + * Promise + */ + getSubscriptionsUnderManagementGroup(groupId: string, options?: Models.ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupOptionalParams): Promise; + /** + * @param groupId Management Group ID. + * @param callback The callback + */ + getSubscriptionsUnderManagementGroup(groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param groupId Management Group ID. + * @param options The optional parameters + * @param callback The callback + */ + getSubscriptionsUnderManagementGroup(groupId: string, options: Models.ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupOptionalParams, callback: msRest.ServiceCallback): void; + getSubscriptionsUnderManagementGroup(groupId: string, options?: Models.ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupId, + options + }, + getSubscriptionsUnderManagementGroupOperationSpec, + callback) as Promise; + } + + /** + * Retrieves details about all subscriptions which are associated with the management group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns + * Promise + */ + getSubscriptionsUnderManagementGroupNext(nextPageLink: string, options?: Models.ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + getSubscriptionsUnderManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + getSubscriptionsUnderManagementGroupNext(nextPageLink: string, options: Models.ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + getSubscriptionsUnderManagementGroupNext(nextPageLink: string, options?: Models.ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + getSubscriptionsUnderManagementGroupNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -108,7 +197,9 @@ const createOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 204: {}, + 200: { + bodyMapper: Mappers.SubscriptionUnderManagementGroup + }, default: { bodyMapper: Mappers.ErrorResponse } @@ -131,6 +222,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { + 200: {}, 204: {}, default: { bodyMapper: Mappers.ErrorResponse @@ -138,3 +230,77 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { }, serializer }; + +const getSubscriptionOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Management/managementGroups/{groupId}/subscriptions/{subscriptionId}", + urlParameters: [ + Parameters.groupId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.cacheControl, + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SubscriptionUnderManagementGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getSubscriptionsUnderManagementGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Management/managementGroups/{groupId}/subscriptions", + urlParameters: [ + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skiptoken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListSubscriptionUnderManagementGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getSubscriptionsUnderManagementGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skiptoken + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ListSubscriptionUnderManagementGroup + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/managementgroups/arm-managementgroups/src/operations/managementGroups.ts b/sdk/managementgroups/arm-managementgroups/src/operations/managementGroups.ts index 5184f89175ae..f78c6f9bf3d9 100644 --- a/sdk/managementgroups/arm-managementgroups/src/operations/managementGroups.ts +++ b/sdk/managementgroups/arm-managementgroups/src/operations/managementGroups.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -80,9 +79,9 @@ export class ManagementGroups { } /** - * Create or update a management group. If a management group is already created and a subsequent - * create request is issued with different properties, the management group properties will be - * updated. + * Create or update a management group. + * If a management group is already created and a subsequent create request is issued with + * different properties, the management group properties will be updated. * @param groupId Management Group ID. * @param createManagementGroupRequest Management group creation parameters. * @param [options] The optional parameters @@ -126,20 +125,49 @@ export class ManagementGroups { } /** - * Delete management group. If a management group contains child resources, the request will fail. + * Delete management group. + * If a management group contains child resources, the request will fail. * @param groupId Management Group ID. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(groupId: string, options?: Models.ManagementGroupsDeleteMethodOptionalParams): Promise { + deleteMethod(groupId: string, options?: Models.ManagementGroupsDeleteMethodOptionalParams): Promise { return this.beginDeleteMethod(groupId,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** - * Create or update a management group. If a management group is already created and a subsequent - * create request is issued with different properties, the management group properties will be - * updated. + * List all entities that descend from a management group. + * @param groupId Management Group ID. + * @param [options] The optional parameters + * @returns Promise + */ + getDescendants(groupId: string, options?: Models.ManagementGroupsGetDescendantsOptionalParams): Promise; + /** + * @param groupId Management Group ID. + * @param callback The callback + */ + getDescendants(groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param groupId Management Group ID. + * @param options The optional parameters + * @param callback The callback + */ + getDescendants(groupId: string, options: Models.ManagementGroupsGetDescendantsOptionalParams, callback: msRest.ServiceCallback): void; + getDescendants(groupId: string, options?: Models.ManagementGroupsGetDescendantsOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + groupId, + options + }, + getDescendantsOperationSpec, + callback) as Promise; + } + + /** + * Create or update a management group. + * If a management group is already created and a subsequent create request is issued with + * different properties, the management group properties will be updated. * @param groupId Management Group ID. * @param createManagementGroupRequest Management group creation parameters. * @param [options] The optional parameters @@ -157,7 +185,8 @@ export class ManagementGroups { } /** - * Delete management group. If a management group contains child resources, the request will fail. + * Delete management group. + * If a management group contains child resources, the request will fail. * @param groupId Management Group ID. * @param [options] The optional parameters * @returns Promise @@ -199,6 +228,34 @@ export class ManagementGroups { listNextOperationSpec, callback) as Promise; } + + /** + * List all entities that descend from a management group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + getDescendantsNext(nextPageLink: string, options?: Models.ManagementGroupsGetDescendantsNextOptionalParams): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + getDescendantsNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + getDescendantsNext(nextPageLink: string, options: Models.ManagementGroupsGetDescendantsNextOptionalParams, callback: msRest.ServiceCallback): void; + getDescendantsNext(nextPageLink: string, options?: Models.ManagementGroupsGetDescendantsNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + getDescendantsNextOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -283,6 +340,31 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; +const getDescendantsOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.Management/managementGroups/{groupId}/descendants", + urlParameters: [ + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skiptoken, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DescendantListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "providers/Microsoft.Management/managementGroups/{groupId}", @@ -305,13 +387,16 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { }, responses: { 200: { - bodyMapper: Mappers.ManagementGroup + bodyMapper: Mappers.ManagementGroup, + headersMapper: Mappers.ManagementGroupsCreateOrUpdateHeaders }, 202: { - bodyMapper: Mappers.OperationResults + bodyMapper: Mappers.AzureAsyncOperationResults, + headersMapper: Mappers.ManagementGroupsCreateOrUpdateHeaders }, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.ManagementGroupsCreateOrUpdateHeaders } }, serializer @@ -332,11 +417,15 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { ], responses: { 202: { - bodyMapper: Mappers.OperationResults + bodyMapper: Mappers.AzureAsyncOperationResults, + headersMapper: Mappers.ManagementGroupsDeleteHeaders + }, + 204: { + headersMapper: Mappers.ManagementGroupsDeleteHeaders }, - 204: {}, default: { - bodyMapper: Mappers.ErrorResponse + bodyMapper: Mappers.ErrorResponse, + headersMapper: Mappers.ManagementGroupsDeleteHeaders } }, serializer @@ -349,6 +438,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skiptoken + ], headerParameters: [ Parameters.cacheControl, Parameters.acceptLanguage @@ -363,3 +456,29 @@ const listNextOperationSpec: msRest.OperationSpec = { }, serializer }; + +const getDescendantsNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + queryParameters: [ + Parameters.apiVersion, + Parameters.skiptoken, + Parameters.top + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DescendantListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/managementgroups/arm-managementgroups/src/operations/operations.ts b/sdk/managementgroups/arm-managementgroups/src/operations/operations.ts index fd5186a3ccdb..6c79c0bc4d72 100644 --- a/sdk/managementgroups/arm-managementgroups/src/operations/operations.ts +++ b/sdk/managementgroups/arm-managementgroups/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/managementgroups/arm-managementgroups/tsconfig.json b/sdk/managementgroups/arm-managementgroups/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/managementgroups/arm-managementgroups/tsconfig.json +++ b/sdk/managementgroups/arm-managementgroups/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true