Skip to content

Commit

Permalink
Generated from b15efeccad067a7d52027c671538ab1730dc48ca
Browse files Browse the repository at this point in the history
  • Loading branch information
SDK Automation committed Sep 25, 2020
1 parent d7af342 commit 9c26823
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sdk/resources/arm-resources/src/models/managementGroupMappers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
CloudError,
ErrorAdditionalInfo,
ErrorResponse
} from "../models/mappers";
1 change: 1 addition & 0 deletions sdk/resources/arm-resources/src/operations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
export * from "./operations";
export * from "./deployments";
export * from "./providers";
export * from "./managementGroup";
export * from "./resources";
export * from "./resourceGroups";
export * from "./tagsOperations";
Expand Down
83 changes: 83 additions & 0 deletions sdk/resources/arm-resources/src/operations/managementGroup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* 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 Mappers from "../models/managementGroupMappers";
import * as Parameters from "../models/parameters";
import { ResourceManagementClientContext } from "../resourceManagementClientContext";

/** Class representing a ManagementGroup. */
export class ManagementGroup {
private readonly client: ResourceManagementClientContext;

/**
* Create a ManagementGroup.
* @param {ResourceManagementClientContext} client Reference to the service client.
*/
constructor(client: ResourceManagementClientContext) {
this.client = client;
}

/**
* Registers a management group with a resource provider.
* @param resourceProviderNamespace The namespace of the resource provider to register.
* @param groupId The management group ID.
* @param [options] The optional parameters
* @returns Promise<msRest.RestResponse>
*/
register(resourceProviderNamespace: string, groupId: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse>;
/**
* @param resourceProviderNamespace The namespace of the resource provider to register.
* @param groupId The management group ID.
* @param callback The callback
*/
register(resourceProviderNamespace: string, groupId: string, callback: msRest.ServiceCallback<void>): void;
/**
* @param resourceProviderNamespace The namespace of the resource provider to register.
* @param groupId The management group ID.
* @param options The optional parameters
* @param callback The callback
*/
register(resourceProviderNamespace: string, groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
register(resourceProviderNamespace: string, groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
return this.client.sendOperationRequest(
{
resourceProviderNamespace,
groupId,
options
},
registerOperationSpec,
callback);
}
}

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const registerOperationSpec: msRest.OperationSpec = {
httpMethod: "POST",
path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/{resourceProviderNamespace}/register",
urlParameters: [
Parameters.resourceProviderNamespace,
Parameters.groupId
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
responses: {
200: {},
default: {
bodyMapper: Mappers.CloudError
}
},
serializer
};
2 changes: 2 additions & 0 deletions sdk/resources/arm-resources/src/resourceManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class ResourceManagementClient extends ResourceManagementClientContext {
operations: operations.Operations;
deployments: operations.Deployments;
providers: operations.Providers;
managementGroup: operations.ManagementGroup;
resources: operations.Resources;
resourceGroups: operations.ResourceGroups;
tags: operations.TagsOperations;
Expand All @@ -36,6 +37,7 @@ class ResourceManagementClient extends ResourceManagementClientContext {
this.operations = new operations.Operations(this);
this.deployments = new operations.Deployments(this);
this.providers = new operations.Providers(this);
this.managementGroup = new operations.ManagementGroup(this);
this.resources = new operations.Resources(this);
this.resourceGroups = new operations.ResourceGroups(this);
this.tags = new operations.TagsOperations(this);
Expand Down

0 comments on commit 9c26823

Please sign in to comment.