/*
* 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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
import { setContinuationToken } from "../pagingHelper";
import { Namespaces } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { NotificationHubsManagementClient } from "../notificationHubsManagementClient";
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
import { LroImpl } from "../lroImpl";
import {
NamespaceResource,
NamespacesListNextOptionalParams,
NamespacesListOptionalParams,
NamespacesListResponse,
NamespacesListAllNextOptionalParams,
NamespacesListAllOptionalParams,
NamespacesListAllResponse,
SharedAccessAuthorizationRuleResource,
NamespacesListAuthorizationRulesNextOptionalParams,
NamespacesListAuthorizationRulesOptionalParams,
NamespacesListAuthorizationRulesResponse,
CheckAvailabilityParameters,
NamespacesCheckAvailabilityOptionalParams,
NamespacesCheckAvailabilityResponse,
NamespaceCreateOrUpdateParameters,
NamespacesCreateOrUpdateOptionalParams,
NamespacesCreateOrUpdateResponse,
NamespacePatchParameters,
NamespacesPatchOptionalParams,
NamespacesPatchResponse,
NamespacesDeleteOptionalParams,
NamespacesGetOptionalParams,
NamespacesGetResponse,
SharedAccessAuthorizationRuleCreateOrUpdateParameters,
NamespacesCreateOrUpdateAuthorizationRuleOptionalParams,
NamespacesCreateOrUpdateAuthorizationRuleResponse,
NamespacesDeleteAuthorizationRuleOptionalParams,
NamespacesGetAuthorizationRuleOptionalParams,
NamespacesGetAuthorizationRuleResponse,
NamespacesListKeysOptionalParams,
NamespacesListKeysResponse,
PolicykeyResource,
NamespacesRegenerateKeysOptionalParams,
NamespacesRegenerateKeysResponse,
NamespacesListNextResponse,
NamespacesListAllNextResponse,
NamespacesListAuthorizationRulesNextResponse
} from "../models";
///
/** Class containing Namespaces operations. */
export class NamespacesImpl implements Namespaces {
private readonly client: NotificationHubsManagementClient;
/**
* Initialize a new instance of the class Namespaces class.
* @param client Reference to the service client
*/
constructor(client: NotificationHubsManagementClient) {
this.client = client;
}
/**
* Lists the available namespaces within a resourceGroup.
* @param resourceGroupName The name of the resource group. If resourceGroupName value is null the
* method lists all the namespaces within subscription
* @param options The options parameters.
*/
public list(
resourceGroupName: string,
options?: NamespacesListOptionalParams
): PagedAsyncIterableIterator {
const iter = this.listPagingAll(resourceGroupName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings?: PageSettings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listPagingPage(resourceGroupName, options, settings);
}
};
}
private async *listPagingPage(
resourceGroupName: string,
options?: NamespacesListOptionalParams,
settings?: PageSettings
): AsyncIterableIterator {
let result: NamespacesListResponse;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._list(resourceGroupName, options);
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listNext(
resourceGroupName,
continuationToken,
options
);
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
private async *listPagingAll(
resourceGroupName: string,
options?: NamespacesListOptionalParams
): AsyncIterableIterator {
for await (const page of this.listPagingPage(resourceGroupName, options)) {
yield* page;
}
}
/**
* Lists all the available namespaces within the subscription irrespective of the resourceGroups.
* @param options The options parameters.
*/
public listAll(
options?: NamespacesListAllOptionalParams
): PagedAsyncIterableIterator {
const iter = this.listAllPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings?: PageSettings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listAllPagingPage(options, settings);
}
};
}
private async *listAllPagingPage(
options?: NamespacesListAllOptionalParams,
settings?: PageSettings
): AsyncIterableIterator {
let result: NamespacesListAllResponse;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listAll(options);
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listAllNext(continuationToken, options);
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
private async *listAllPagingAll(
options?: NamespacesListAllOptionalParams
): AsyncIterableIterator {
for await (const page of this.listAllPagingPage(options)) {
yield* page;
}
}
/**
* Gets the authorization rules for a namespace.
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name
* @param options The options parameters.
*/
public listAuthorizationRules(
resourceGroupName: string,
namespaceName: string,
options?: NamespacesListAuthorizationRulesOptionalParams
): PagedAsyncIterableIterator {
const iter = this.listAuthorizationRulesPagingAll(
resourceGroupName,
namespaceName,
options
);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings?: PageSettings) => {
if (settings?.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listAuthorizationRulesPagingPage(
resourceGroupName,
namespaceName,
options,
settings
);
}
};
}
private async *listAuthorizationRulesPagingPage(
resourceGroupName: string,
namespaceName: string,
options?: NamespacesListAuthorizationRulesOptionalParams,
settings?: PageSettings
): AsyncIterableIterator {
let result: NamespacesListAuthorizationRulesResponse;
let continuationToken = settings?.continuationToken;
if (!continuationToken) {
result = await this._listAuthorizationRules(
resourceGroupName,
namespaceName,
options
);
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield page;
}
while (continuationToken) {
result = await this._listAuthorizationRulesNext(
resourceGroupName,
namespaceName,
continuationToken,
options
);
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield page;
}
}
private async *listAuthorizationRulesPagingAll(
resourceGroupName: string,
namespaceName: string,
options?: NamespacesListAuthorizationRulesOptionalParams
): AsyncIterableIterator {
for await (const page of this.listAuthorizationRulesPagingPage(
resourceGroupName,
namespaceName,
options
)) {
yield* page;
}
}
/**
* Checks the availability of the given service namespace across all Azure subscriptions. This is
* useful because the domain name is created based on the service namespace name.
* @param parameters The namespace name.
* @param options The options parameters.
*/
checkAvailability(
parameters: CheckAvailabilityParameters,
options?: NamespacesCheckAvailabilityOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ parameters, options },
checkAvailabilityOperationSpec
);
}
/**
* Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable.
* This operation is idempotent.
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param parameters Parameters supplied to create a Namespace Resource.
* @param options The options parameters.
*/
createOrUpdate(
resourceGroupName: string,
namespaceName: string,
parameters: NamespaceCreateOrUpdateParameters,
options?: NamespacesCreateOrUpdateOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, namespaceName, parameters, options },
createOrUpdateOperationSpec
);
}
/**
* Patches the existing namespace
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param parameters Parameters supplied to patch a Namespace Resource.
* @param options The options parameters.
*/
patch(
resourceGroupName: string,
namespaceName: string,
parameters: NamespacePatchParameters,
options?: NamespacesPatchOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, namespaceName, parameters, options },
patchOperationSpec
);
}
/**
* Deletes an existing namespace. This operation also removes all associated notificationHubs under the
* namespace.
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param options The options parameters.
*/
async beginDelete(
resourceGroupName: string,
namespaceName: string,
options?: NamespacesDeleteOptionalParams
): Promise, void>> {
const directSendOperation = async (
args: coreClient.OperationArguments,
spec: coreClient.OperationSpec
): Promise => {
return this.client.sendOperationRequest(args, spec);
};
const sendOperation = async (
args: coreClient.OperationArguments,
spec: coreClient.OperationSpec
) => {
let currentRawResponse:
| coreClient.FullOperationResponse
| undefined = undefined;
const providedCallback = args.options?.onResponse;
const callback: coreClient.RawResponseCallback = (
rawResponse: coreClient.FullOperationResponse,
flatResponse: unknown
) => {
currentRawResponse = rawResponse;
providedCallback?.(rawResponse, flatResponse);
};
const updatedArgs = {
...args,
options: {
...args.options,
onResponse: callback
}
};
const flatResponse = await directSendOperation(updatedArgs, spec);
return {
flatResponse,
rawResponse: {
statusCode: currentRawResponse!.status,
body: currentRawResponse!.parsedBody,
headers: currentRawResponse!.headers.toJSON()
}
};
};
const lro = new LroImpl(
sendOperation,
{ resourceGroupName, namespaceName, options },
deleteOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
* Deletes an existing namespace. This operation also removes all associated notificationHubs under the
* namespace.
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param options The options parameters.
*/
async beginDeleteAndWait(
resourceGroupName: string,
namespaceName: string,
options?: NamespacesDeleteOptionalParams
): Promise {
const poller = await this.beginDelete(
resourceGroupName,
namespaceName,
options
);
return poller.pollUntilDone();
}
/**
* Returns the description for the specified namespace.
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param options The options parameters.
*/
get(
resourceGroupName: string,
namespaceName: string,
options?: NamespacesGetOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, namespaceName, options },
getOperationSpec
);
}
/**
* Creates an authorization rule for a namespace
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param authorizationRuleName Authorization Rule Name.
* @param parameters The shared access authorization rule.
* @param options The options parameters.
*/
createOrUpdateAuthorizationRule(
resourceGroupName: string,
namespaceName: string,
authorizationRuleName: string,
parameters: SharedAccessAuthorizationRuleCreateOrUpdateParameters,
options?: NamespacesCreateOrUpdateAuthorizationRuleOptionalParams
): Promise {
return this.client.sendOperationRequest(
{
resourceGroupName,
namespaceName,
authorizationRuleName,
parameters,
options
},
createOrUpdateAuthorizationRuleOperationSpec
);
}
/**
* Deletes a namespace authorization rule
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param authorizationRuleName Authorization Rule Name.
* @param options The options parameters.
*/
deleteAuthorizationRule(
resourceGroupName: string,
namespaceName: string,
authorizationRuleName: string,
options?: NamespacesDeleteAuthorizationRuleOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, namespaceName, authorizationRuleName, options },
deleteAuthorizationRuleOperationSpec
);
}
/**
* Gets an authorization rule for a namespace by name.
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name
* @param authorizationRuleName Authorization rule name.
* @param options The options parameters.
*/
getAuthorizationRule(
resourceGroupName: string,
namespaceName: string,
authorizationRuleName: string,
options?: NamespacesGetAuthorizationRuleOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, namespaceName, authorizationRuleName, options },
getAuthorizationRuleOperationSpec
);
}
/**
* Lists the available namespaces within a resourceGroup.
* @param resourceGroupName The name of the resource group. If resourceGroupName value is null the
* method lists all the namespaces within subscription
* @param options The options parameters.
*/
private _list(
resourceGroupName: string,
options?: NamespacesListOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, options },
listOperationSpec
);
}
/**
* Lists all the available namespaces within the subscription irrespective of the resourceGroups.
* @param options The options parameters.
*/
private _listAll(
options?: NamespacesListAllOptionalParams
): Promise {
return this.client.sendOperationRequest({ options }, listAllOperationSpec);
}
/**
* Gets the authorization rules for a namespace.
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name
* @param options The options parameters.
*/
private _listAuthorizationRules(
resourceGroupName: string,
namespaceName: string,
options?: NamespacesListAuthorizationRulesOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, namespaceName, options },
listAuthorizationRulesOperationSpec
);
}
/**
* Gets the Primary and Secondary ConnectionStrings to the namespace
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param authorizationRuleName The connection string of the namespace for the specified
* authorizationRule.
* @param options The options parameters.
*/
listKeys(
resourceGroupName: string,
namespaceName: string,
authorizationRuleName: string,
options?: NamespacesListKeysOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, namespaceName, authorizationRuleName, options },
listKeysOperationSpec
);
}
/**
* Regenerates the Primary/Secondary Keys to the Namespace Authorization Rule
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name.
* @param authorizationRuleName The connection string of the namespace for the specified
* authorizationRule.
* @param parameters Parameters supplied to regenerate the Namespace Authorization Rule Key.
* @param options The options parameters.
*/
regenerateKeys(
resourceGroupName: string,
namespaceName: string,
authorizationRuleName: string,
parameters: PolicykeyResource,
options?: NamespacesRegenerateKeysOptionalParams
): Promise {
return this.client.sendOperationRequest(
{
resourceGroupName,
namespaceName,
authorizationRuleName,
parameters,
options
},
regenerateKeysOperationSpec
);
}
/**
* ListNext
* @param resourceGroupName The name of the resource group. If resourceGroupName value is null the
* method lists all the namespaces within subscription
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
private _listNext(
resourceGroupName: string,
nextLink: string,
options?: NamespacesListNextOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, nextLink, options },
listNextOperationSpec
);
}
/**
* ListAllNext
* @param nextLink The nextLink from the previous successful call to the ListAll method.
* @param options The options parameters.
*/
private _listAllNext(
nextLink: string,
options?: NamespacesListAllNextOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ nextLink, options },
listAllNextOperationSpec
);
}
/**
* ListAuthorizationRulesNext
* @param resourceGroupName The name of the resource group.
* @param namespaceName The namespace name
* @param nextLink The nextLink from the previous successful call to the ListAuthorizationRules method.
* @param options The options parameters.
*/
private _listAuthorizationRulesNext(
resourceGroupName: string,
namespaceName: string,
nextLink: string,
options?: NamespacesListAuthorizationRulesNextOptionalParams
): Promise {
return this.client.sendOperationRequest(
{ resourceGroupName, namespaceName, nextLink, options },
listAuthorizationRulesNextOperationSpec
);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const checkAvailabilityOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNamespaceAvailability",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.CheckAvailabilityResult
}
},
requestBody: Parameters.parameters,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.NamespaceResource
},
201: {
bodyMapper: Mappers.NamespaceResource
}
},
requestBody: Parameters.parameters1,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const patchOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
httpMethod: "PATCH",
responses: {
200: {
bodyMapper: Mappers.NamespaceResource
}
},
requestBody: Parameters.parameters2,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const deleteOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
httpMethod: "DELETE",
responses: { 200: {}, 201: {}, 202: {}, 204: {} },
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName
],
serializer
};
const getOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.NamespaceResource
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName
],
headerParameters: [Parameters.accept],
serializer
};
const createOrUpdateAuthorizationRuleOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.SharedAccessAuthorizationRuleResource
}
},
requestBody: Parameters.parameters3,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName,
Parameters.authorizationRuleName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const deleteAuthorizationRuleOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}",
httpMethod: "DELETE",
responses: { 200: {}, 204: {} },
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName,
Parameters.authorizationRuleName
],
serializer
};
const getAuthorizationRuleOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.SharedAccessAuthorizationRuleResource
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName,
Parameters.authorizationRuleName
],
headerParameters: [Parameters.accept],
serializer
};
const listOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.NamespaceListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept],
serializer
};
const listAllOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/namespaces",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.NamespaceListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const listAuthorizationRulesOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.SharedAccessAuthorizationRuleListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName
],
headerParameters: [Parameters.accept],
serializer
};
const listKeysOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.ResourceListKeys
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName,
Parameters.authorizationRuleName
],
headerParameters: [Parameters.accept],
serializer
};
const regenerateKeysOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.ResourceListKeys
}
},
requestBody: Parameters.parameters4,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName,
Parameters.authorizationRuleName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.NamespaceListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept],
serializer
};
const listAllNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.NamespaceListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId
],
headerParameters: [Parameters.accept],
serializer
};
const listAuthorizationRulesNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.SharedAccessAuthorizationRuleListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.namespaceName
],
headerParameters: [Parameters.accept],
serializer
};