forked from Azure/azure-sdk-for-js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from b15efeccad067a7d52027c671538ab1730dc48ca
- Loading branch information
SDK Automation
committed
Sep 25, 2020
1 parent
d7af342
commit 9c26823
Showing
4 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
sdk/resources/arm-resources/src/models/managementGroupMappers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
sdk/resources/arm-resources/src/operations/managementGroup.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters