diff --git a/sdk/communication/arm-communication/LICENSE.txt b/sdk/communication/arm-communication/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/communication/arm-communication/LICENSE.txt +++ b/sdk/communication/arm-communication/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/communication/arm-communication/README.md b/sdk/communication/arm-communication/README.md index 66d1e07c2145..6de5fb8a12ba 100644 --- a/sdk/communication/arm-communication/README.md +++ b/sdk/communication/arm-communication/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-communication ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - client creation and list operations as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { CommunicationServiceManagementClient, CommunicationServiceManagementModels, CommunicationServiceManagementMappers } from "@azure/arm-communication"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { CommunicationServiceManagementClient } = require("@azure/arm-communication"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/communication/arm-communication/rollup.config.js b/sdk/communication/arm-communication/rollup.config.js index 0268bc1dad9a..118440bec6df 100644 --- a/sdk/communication/arm-communication/rollup.config.js +++ b/sdk/communication/arm-communication/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts index f6bf852fb800..4e5cad89ba86 100644 --- a/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts +++ b/sdk/communication/arm-communication/src/communicationServiceManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -24,8 +23,7 @@ class CommunicationServiceManagementClient extends CommunicationServiceManagemen /** * Initializes a new instance of the CommunicationServiceManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Gets subscription ID which uniquely identifies the Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CommunicationServiceManagementClientOptions) { diff --git a/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts b/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts index 5fc002a5a912..788729aaaff5 100644 --- a/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts +++ b/sdk/communication/arm-communication/src/communicationServiceManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -17,14 +16,13 @@ const packageVersion = "1.0.0"; export class CommunicationServiceManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - apiVersion?: string; subscriptionId: string; + apiVersion?: string; /** * Initializes a new instance of the CommunicationServiceManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Gets subscription ID which uniquely identifies the Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.CommunicationServiceManagementClientOptions) { @@ -45,7 +43,7 @@ export class CommunicationServiceManagementClientContext extends msRestAzure.Azu super(credentials, options); - this.apiVersion = '2020-08-20-preview'; + this.apiVersion = '2020-08-20'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/communication/arm-communication/src/models/communicationServiceMappers.ts b/sdk/communication/arm-communication/src/models/communicationServiceMappers.ts index 9e29f790f0a9..c1300c2aab84 100644 --- a/sdk/communication/arm-communication/src/models/communicationServiceMappers.ts +++ b/sdk/communication/arm-communication/src/models/communicationServiceMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -12,10 +12,13 @@ export { CommunicationServiceKeys, CommunicationServiceResource, CommunicationServiceResourceList, + ErrorAdditionalInfo, + ErrorDetail, ErrorResponse, - ErrorResponseError, LinkedNotificationHub, LinkNotificationHubParameters, + NameAvailability, + NameAvailabilityParameters, RegenerateKeyParameters, - TaggedResource + SystemData } from "../models/mappers"; diff --git a/sdk/communication/arm-communication/src/models/index.ts b/sdk/communication/arm-communication/src/models/index.ts index f53330ffb9e0..ee60ae75365c 100644 --- a/sdk/communication/arm-communication/src/models/index.ts +++ b/sdk/communication/arm-communication/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -12,184 +12,119 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; /** - * The error + * Data POST-ed to the nameAvailability action */ -export interface ErrorResponseError { +export interface NameAvailabilityParameters { /** - * Error code. + * The resource type. Should be always "Microsoft.Communication/CommunicationServices". */ - code?: string; + type: string; /** - * Error message indicating why the operation failed. + * The CommunicationService name to validate. e.g."my-CommunicationService-name-here" */ - message?: string; + name: string; } /** - * Error response indicating why the requested operation could not be performed. + * Result of the request to check name availability. It contains a flag and possible reason of + * failure. */ -export interface ErrorResponse { +export interface NameAvailability { /** - * The error + * Indicates whether the name is available or not. */ - error?: ErrorResponseError; -} - -/** - * The object that describes a operation. - */ -export interface OperationDisplay { + nameAvailable?: boolean; /** - * Friendly name of the resource provider + * The reason of the availability. Required if name is not available. */ - provider?: string; + reason?: string; /** - * Resource type on which the operation is performed. + * The message of the operation. */ - resource?: string; - /** - * The localized friendly name for the operation. - */ - operation?: string; - /** - * The localized friendly description for the operation - */ - description?: string; + message?: string; } /** - * Specifications of the Dimension of metrics. + * Description of an Azure Notification Hub to link to the communication service */ -export interface Dimension { - /** - * The public facing name of the dimension. - */ - name?: string; - /** - * Localized friendly display name of the dimension. - */ - displayName?: string; +export interface LinkNotificationHubParameters { /** - * Name of the dimension as it appears in MDM. + * The resource ID of the notification hub */ - internalName?: string; + resourceId: string; /** - * A Boolean flag indicating whether this dimension should be included for the shoebox export - * scenario. + * Connection string for the notification hub */ - toBeExportedForShoebox?: boolean; + connectionString: string; } /** - * Specifications of the Metrics for Azure Monitoring. + * A notification hub that has been linked to the communication service */ -export interface MetricSpecification { - /** - * Name of the metric. - */ - name?: string; - /** - * Localized friendly display name of the metric. - */ - displayName?: string; - /** - * Localized friendly description of the metric. - */ - displayDescription?: string; - /** - * The unit that makes sense for the metric. - */ - unit?: string; - /** - * The method for aggregating the metric. Possible values include: 'Average', 'Minimum', - * 'Maximum', 'Total', 'Count' - */ - aggregationType?: AggregationType; - /** - * Optional. If set to true, then zero will be returned for time duration where no metric is - * emitted/published. - * Ex. a metric that returns the number of times a particular error code was emitted. The error - * code may not appear - * often, instead of the RP publishing 0, Shoebox can auto fill in 0s for time periods where - * nothing was emitted. - */ - fillGapWithZero?: string; - /** - * The name of the metric category that the metric belongs to. A metric can only belong to a - * single category. - */ - category?: string; +export interface LinkedNotificationHub { /** - * The dimensions of the metrics. + * The resource ID of the notification hub */ - dimensions?: Dimension[]; + resourceId?: string; } /** - * An object that describes a specification. + * The resource management error additional info. */ -export interface ServiceSpecification { +export interface ErrorAdditionalInfo { /** - * Specifications of the Metrics for Azure Monitoring. + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - metricSpecifications?: MetricSpecification[]; -} - -/** - * Extra Operation properties. - */ -export interface OperationProperties { + readonly type?: string; /** - * The service specifications. + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - serviceSpecification?: ServiceSpecification; + readonly info?: any; } /** - * REST API operation supported by CommunicationService resource provider. + * The error detail. */ -export interface Operation { +export interface ErrorDetail { /** - * Name of the operation with format: {provider}/{resource}/{operation} - */ - name?: string; - /** - * The object that describes the operation. + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationDisplay; + readonly code?: string; /** - * Optional. The intended executor of the operation; governs the display of the operation in the - * RBAC UX and the audit logs UX. + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - origin?: string; + readonly message?: string; /** - * Extra properties for the operation. + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - properties?: OperationProperties; -} - -/** - * Description of an Azure Notification Hub to link to the communication service - */ -export interface LinkNotificationHubParameters { + readonly target?: string; /** - * The resource ID of the notification hub + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resourceId: string; + readonly details?: ErrorDetail[]; /** - * Connection string for the notification hub + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - connectionString: string; + readonly additionalInfo?: ErrorAdditionalInfo[]; } /** - * A notification hub that has been linked to the communication service + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response */ -export interface LinkedNotificationHub { +export interface ErrorResponse { /** - * The resource ID of the notification hub + * The error object. */ - resourceId?: string; + error?: ErrorDetail; } /** @@ -197,7 +132,7 @@ export interface LinkedNotificationHub { */ export interface OperationStatus { /** - * The operation Id. + * Fully qualified ID for the operation status. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; @@ -223,9 +158,41 @@ export interface OperationStatus { */ readonly percentComplete?: number; /** - * The error + * The error object. + */ + error?: ErrorDetail; +} + +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). */ - error?: ErrorResponseError; + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The timestamp of resource last modification (UTC) + */ + lastModifiedAt?: Date; } /** @@ -233,17 +200,19 @@ export interface OperationStatus { */ export interface CommunicationServiceResource { /** - * Fully qualified resource ID for the resource. + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * The name of the resource. + * The name of the resource * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * The type of the service - e.g. "Microsoft.Communication/CommunicationServices" + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; @@ -286,27 +255,7 @@ export interface CommunicationServiceResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly immutableResourceId?: string; -} - -/** - * The core properties of ARM resources. - */ -export interface Resource extends BaseResource { - /** - * Fully qualified resource ID for the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * The name of the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * The type of the service - e.g. "Microsoft.Communication/CommunicationServices" - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; + systemData?: SystemData; } /** @@ -362,32 +311,158 @@ export interface RegenerateKeyParameters { keyType?: KeyType; } +/** + * Common fields that are returned in the response for all Azure Resource Manager resources + * @summary Resource + */ +export interface Resource extends BaseResource { + /** + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; +} + +/** + * The resource model definition for a Azure Resource Manager proxy resource. It will not have tags + * and a location + * @summary Proxy Resource + */ +export interface ProxyResource extends Resource { +} + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has + * 'tags' and a 'location' + * @summary Tracked Resource + */ +export interface TrackedResource extends Resource { + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + +/** + * The resource model definition for an Azure Resource Manager resource with an etag. + * @summary Entity Resource + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * Localized display information for this particular operation. + */ +export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring + * Insights" or "Microsoft Compute". + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provider?: string; + /** + * The localized friendly name of the resource type related to this operation. E.g. "Virtual + * Machines" or "Job Schedule Collections". + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly resource?: string; + /** + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create + * or Update Virtual Machine", "Restart Virtual Machine". + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly operation?: string; + /** + * The short, localized friendly description of the operation; suitable for tool tips and + * detailed views. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly description?: string; +} + +/** + * Details of a REST API operation, returned from the Resource Provider Operations API + * @summary REST API Operation + */ +export interface Operation { + /** + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Whether the operation applies to data-plane. This is "true" for data-plane operations and + * "false" for ARM/control-plane operations. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly isDataAction?: boolean; + /** + * Localized display information for this particular operation. + */ + display?: OperationDisplay; + /** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + * logs UX. Default value is "user,system". Possible values include: 'user', 'system', + * 'user,system' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly origin?: Origin; + /** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + * Possible values include: 'Internal' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionType?: ActionType; +} + /** * Optional Parameters. */ -export interface CommunicationServiceLinkNotificationHubOptionalParams extends msRest.RequestOptionsBase { +export interface CommunicationServiceCheckNameAvailabilityOptionalParams extends msRest.RequestOptionsBase { /** * Parameters supplied to the operation. */ - linkNotificationHubParameters?: LinkNotificationHubParameters; + nameAvailabilityParameters?: NameAvailabilityParameters; } /** * Optional Parameters. */ -export interface CommunicationServiceUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface CommunicationServiceLinkNotificationHubOptionalParams extends msRest.RequestOptionsBase { /** - * Parameters for the update operation + * Parameters supplied to the operation. */ - parameters?: TaggedResource; + linkNotificationHubParameters?: LinkNotificationHubParameters; } /** * Optional Parameters. */ -export interface CommunicationServiceCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { +export interface CommunicationServiceUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * Parameters for the create or update operation + * Parameters for the update operation */ parameters?: CommunicationServiceResource; } @@ -395,11 +470,11 @@ export interface CommunicationServiceCreateOrUpdateOptionalParams extends msRest /** * Optional Parameters. */ -export interface CommunicationServiceRegenerateKeyOptionalParams extends msRest.RequestOptionsBase { +export interface CommunicationServiceCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * Parameter that describes the Regenerate Key Operation. + * Parameters for the create or update operation */ - parameters?: RegenerateKeyParameters; + parameters?: CommunicationServiceResource; } /** @@ -441,15 +516,16 @@ export interface CommunicationServiceDeleteHeaders { /** * @interface - * Result of the request to list REST API operations. It contains a list of operations. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link + * to get the next set of results. * @extends Array */ -export interface OperationList extends Array { +export interface OperationListResult extends Array { /** - * The URL the client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. + * URL to get the next set of operation list results (if there are any). + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - nextLink?: string; + readonly nextLink?: string; } /** @@ -465,14 +541,6 @@ export interface CommunicationServiceResourceList extends Array + */ + checkNameAvailability(options?: Models.CommunicationServiceCheckNameAvailabilityOptionalParams): Promise; + /** + * @param callback The callback + */ + checkNameAvailability(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + checkNameAvailability(options: Models.CommunicationServiceCheckNameAvailabilityOptionalParams, callback: msRest.ServiceCallback): void; + checkNameAvailability(options?: Models.CommunicationServiceCheckNameAvailabilityOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + checkNameAvailabilityOperationSpec, + callback) as Promise; + } + /** * Links an Azure Notification Hub to this communication service. * @summary Link Notification Hub - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise */ linkNotificationHub(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceLinkNotificationHubOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param callback The callback */ linkNotificationHub(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param options The optional parameters * @param callback The callback @@ -91,21 +112,18 @@ export class CommunicationService { /** * Handles requests to list all resources in a resource group. * @summary List By Resource Group - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -123,23 +141,20 @@ export class CommunicationService { /** * Operation to update an existing CommunicationService. * @summary Update - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise */ update(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceUpdateOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param callback The callback */ update(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param options The optional parameters * @param callback The callback @@ -159,23 +174,20 @@ export class CommunicationService { /** * Get the CommunicationService and its properties. * @summary Get - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param callback The callback */ get(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param options The optional parameters * @param callback The callback @@ -195,8 +207,7 @@ export class CommunicationService { /** * Create a new CommunicationService or update an existing CommunicationService. * @summary Create Or Update - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise @@ -209,8 +220,7 @@ export class CommunicationService { /** * Operation to delete a CommunicationService. * @summary Delete - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise @@ -223,23 +233,20 @@ export class CommunicationService { /** * Get the access keys of the CommunicationService resource. * @summary List Keys - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise */ listKeys(resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param callback The callback */ listKeys(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param options The optional parameters * @param callback The callback @@ -260,31 +267,32 @@ export class CommunicationService { * Regenerate CommunicationService access key. PrimaryKey and SecondaryKey cannot be regenerated at * the same time. * @summary Regenerate Key - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param parameters Parameter that describes the Regenerate Key Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise */ - regenerateKey(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceRegenerateKeyOptionalParams): Promise; + regenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param parameters Parameter that describes the Regenerate Key Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param callback The callback */ - regenerateKey(resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; + regenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, communicationServiceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param parameters Parameter that describes the Regenerate Key Operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param options The optional parameters * @param callback The callback */ - regenerateKey(resourceGroupName: string, communicationServiceName: string, options: Models.CommunicationServiceRegenerateKeyOptionalParams, callback: msRest.ServiceCallback): void; - regenerateKey(resourceGroupName: string, communicationServiceName: string, options?: Models.CommunicationServiceRegenerateKeyOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + regenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, communicationServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerateKey(parameters: Models.RegenerateKeyParameters, resourceGroupName: string, communicationServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { + parameters, resourceGroupName, communicationServiceName, options @@ -296,8 +304,7 @@ export class CommunicationService { /** * Create a new CommunicationService or update an existing CommunicationService. * @summary Create Or Update - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise @@ -316,8 +323,7 @@ export class CommunicationService { /** * Operation to delete a CommunicationService. * @summary Delete - * @param resourceGroupName The name of the resource group that contains the resource. You can - * obtain this value from the Azure Resource Manager API or the portal. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param communicationServiceName The name of the CommunicationService resource. * @param [options] The optional parameters * @returns Promise @@ -394,6 +400,36 @@ export class CommunicationService { // Operation Specifications const serializer = new msRest.Serializer(Mappers); +const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Communication/checkNameAvailability", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "nameAvailabilityParameters" + ], + mapper: Mappers.NameAvailabilityParameters + }, + responses: { + 200: { + bodyMapper: Mappers.NameAvailability + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + const linkNotificationHubOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}/linkNotificationHub", @@ -492,7 +528,7 @@ const updateOperationSpec: msRest.OperationSpec = { "options", "parameters" ], - mapper: Mappers.TaggedResource + mapper: Mappers.CommunicationServiceResource }, responses: { 200: { @@ -570,19 +606,16 @@ const regenerateKeyOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], requestBody: { - parameterPath: [ - "options", - "parameters" - ], - mapper: Mappers.RegenerateKeyParameters + parameterPath: "parameters", + mapper: { + ...Mappers.RegenerateKeyParameters, + required: true + } }, responses: { 200: { bodyMapper: Mappers.CommunicationServiceKeys }, - 201: { - bodyMapper: Mappers.CommunicationServiceKeys - }, default: { bodyMapper: Mappers.ErrorResponse } @@ -667,6 +700,9 @@ const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -688,6 +724,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/communication/arm-communication/src/operations/index.ts b/sdk/communication/arm-communication/src/operations/index.ts index 8bfc7298c3a3..652d14e1890c 100644 --- a/sdk/communication/arm-communication/src/operations/index.ts +++ b/sdk/communication/arm-communication/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/communication/arm-communication/src/operations/operationStatuses.ts b/sdk/communication/arm-communication/src/operations/operationStatuses.ts index e7b491c708e0..07144b6d785e 100644 --- a/sdk/communication/arm-communication/src/operations/operationStatuses.ts +++ b/sdk/communication/arm-communication/src/operations/operationStatuses.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/communication/arm-communication/src/operations/operations.ts b/sdk/communication/arm-communication/src/operations/operations.ts index e44adebf41db..1326fe816a69 100644 --- a/sdk/communication/arm-communication/src/operations/operations.ts +++ b/sdk/communication/arm-communication/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -36,13 +35,13 @@ export class Operations { /** * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + list(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options @@ -63,14 +62,14 @@ export class Operations { * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -94,7 +93,7 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.OperationList + bodyMapper: Mappers.OperationListResult }, default: { bodyMapper: Mappers.ErrorResponse @@ -110,12 +109,15 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.OperationList + bodyMapper: Mappers.OperationListResult }, default: { bodyMapper: Mappers.ErrorResponse