Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-resources] Add new api-version of policy for go SDK #2164

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions sdk/resources/arm-resources/src/operations/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,38 @@ export class Providers {
callback) as Promise<Models.ProvidersUnregisterResponse>;
}

/**
* 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>
*/
registerAtManagementGroupScope(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
*/
registerAtManagementGroupScope(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
*/
registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<void>): void;
registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
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.
Expand Down Expand Up @@ -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",
Expand Down