diff --git a/sdk/resources/arm-resources/src/operations/providers.ts b/sdk/resources/arm-resources/src/operations/providers.ts index 6af7adc91231..98e5094c776c 100644 --- a/sdk/resources/arm-resources/src/operations/providers.ts +++ b/sdk/resources/arm-resources/src/operations/providers.ts @@ -54,6 +54,38 @@ export class Providers { callback) as Promise; } + /** + * 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 + */ + registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceProviderNamespace The namespace of the resource provider to register. + * @param groupId The management group ID. + * @param callback The callback + */ + registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, callback: msRest.ServiceCallback): 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 + */ + registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceProviderNamespace, + groupId, + options + }, + registerAtManagementGroupScopeOperationSpec, + callback); + } + /** * Registers a subscription with a resource provider. * @param resourceProviderNamespace The namespace of the resource provider to register. @@ -269,6 +301,28 @@ const unregisterOperationSpec: msRest.OperationSpec = { serializer }; +const registerAtManagementGroupScopeOperationSpec: 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 +}; + const registerOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register",