diff --git a/sdk/signalr/arm-signalr/LICENSE.txt b/sdk/signalr/arm-signalr/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/signalr/arm-signalr/LICENSE.txt +++ b/sdk/signalr/arm-signalr/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 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/signalr/arm-signalr/README.md b/sdk/signalr/arm-signalr/README.md index 278f0caefac9..c2b8b2a30c49 100644 --- a/sdk/signalr/arm-signalr/README.md +++ b/sdk/signalr/arm-signalr/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for SignalRManagementClient. ### How to Install -``` +```bash npm install @azure/arm-signalr ``` @@ -19,13 +19,13 @@ npm install @azure/arm-signalr ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```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"; @@ -47,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -95,5 +95,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/signalr/arm-signalr/README.png) diff --git a/sdk/signalr/arm-signalr/package.json b/sdk/signalr/arm-signalr/package.json index ee959f237a24..d8c5b5b63f84 100644 --- a/sdk/signalr/arm-signalr/package.json +++ b/sdk/signalr/arm-signalr/package.json @@ -2,10 +2,10 @@ "name": "@azure/arm-signalr", "author": "Microsoft Corporation", "description": "SignalRManagementClient Library with typescript type definitions for node.js and browser.", - "version": "1.2.0", + "version": "2.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,15 +23,16 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/signalr/arm-signalr", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/signalr/arm-signalr", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/signalr/arm-signalr/rollup.config.js b/sdk/signalr/arm-signalr/rollup.config.js index 5ce4fd696a08..7ee4e27aa63f 100644 --- a/sdk/signalr/arm-signalr/rollup.config.js +++ b/sdk/signalr/arm-signalr/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/signalRManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/signalRManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-signalr.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/signalr/arm-signalr/src/models/index.ts b/sdk/signalr/arm-signalr/src/models/index.ts index 1af7d1a71449..7f27a39bbd18 100644 --- a/sdk/signalr/arm-signalr/src/models/index.ts +++ b/sdk/signalr/arm-signalr/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,644 +11,547 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing OperationDisplay. * The object that describes a operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Friendly name of the resource provider + * Friendly name of the resource provider */ provider?: string; /** - * @member {string} [resource] Resource type on which the operation is - * performed. + * Resource type on which the operation is performed. */ resource?: string; /** - * @member {string} [operation] The localized friendly name for the - * operation. + * The localized friendly name for the operation. */ operation?: string; /** - * @member {string} [description] The localized friendly description for the - * operation + * The localized friendly description for the operation */ description?: string; } /** - * @interface - * An interface representing Dimension. * Specifications of the Dimension of metrics. - * */ export interface Dimension { /** - * @member {string} [name] The public facing name of the dimension. + * The public facing name of the dimension. */ name?: string; /** - * @member {string} [displayName] Localized friendly display name of the - * dimension. + * Localized friendly display name of the dimension. */ displayName?: string; /** - * @member {string} [internalName] Name of the dimension as it appears in - * MDM. + * Name of the dimension as it appears in MDM. */ internalName?: string; /** - * @member {boolean} [toBeExportedForShoebox] A Boolean flag indicating - * whether this dimension should be included for the shoebox export scenario. + * A Boolean flag indicating whether this dimension should be included for the shoebox export + * scenario. */ toBeExportedForShoebox?: boolean; } /** - * @interface - * An interface representing MetricSpecification. * Specifications of the Metrics for Azure Monitoring. - * */ export interface MetricSpecification { /** - * @member {string} [name] Name of the metric. + * Name of the metric. */ name?: string; /** - * @member {string} [displayName] Localized friendly display name of the - * metric. + * Localized friendly display name of the metric. */ displayName?: string; /** - * @member {string} [displayDescription] Localized friendly description of - * the metric. + * Localized friendly description of the metric. */ displayDescription?: string; /** - * @member {string} [unit] The unit that makes sense for the metric. + * The unit that makes sense for the metric. */ unit?: string; /** - * @member {string} [aggregationType] Only provide one value for this field. - * Valid values: Average, Minimum, Maximum, Total, Count. + * Only provide one value for this field. Valid values: Average, Minimum, Maximum, Total, Count. */ aggregationType?: string; /** - * @member {string} [fillGapWithZero] 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. + * 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; /** - * @member {string} [category] The name of the metric category that the - * metric belongs to. A metric can only belong to a single category. + * The name of the metric category that the metric belongs to. A metric can only belong to a + * single category. */ category?: string; /** - * @member {Dimension[]} [dimensions] The dimensions of the metrics. + * The dimensions of the metrics. */ dimensions?: Dimension[]; } /** - * @interface - * An interface representing ServiceSpecification. * An object that describes a specification. - * */ export interface ServiceSpecification { /** - * @member {MetricSpecification[]} [metricSpecifications] Specifications of - * the Metrics for Azure Monitoring. + * Specifications of the Metrics for Azure Monitoring. */ metricSpecifications?: MetricSpecification[]; } /** - * @interface - * An interface representing OperationProperties. * Extra Operation properties. - * */ export interface OperationProperties { /** - * @member {ServiceSpecification} [serviceSpecification] The service - * specifications. + * The service specifications. */ serviceSpecification?: ServiceSpecification; } /** - * @interface - * An interface representing Operation. * REST API operation supported by SignalR resource provider. - * */ export interface Operation { /** - * @member {string} [name] Name of the operation with format: - * {provider}/{resource}/{operation} + * Name of the operation with format: {provider}/{resource}/{operation} */ name?: string; /** - * @member {OperationDisplay} [display] The object that describes the - * operation. + * The object that describes the operation. */ display?: OperationDisplay; /** - * @member {string} [origin] Optional. The intended executor of the - * operation; governs the display of the operation in the RBAC UX and the - * audit logs UX. + * Optional. The intended executor of the operation; governs the display of the operation in the + * RBAC UX and the audit logs UX. */ origin?: string; /** - * @member {OperationProperties} [properties] Extra properties for the - * operation. + * Extra properties for the operation. */ properties?: OperationProperties; } /** - * @interface - * An interface representing NameAvailabilityParameters. * Data POST-ed to the nameAvailability action - * */ export interface NameAvailabilityParameters { /** - * @member {string} type The resource type. Should be always - * "Microsoft.SignalRService/SignalR". + * The resource type. Should be always "Microsoft.SignalRService/SignalR". */ type: string; /** - * @member {string} name The SignalR service name to validate. - * e.g."my-signalR-name-here" + * The SignalR service name to validate. e.g."my-signalR-name-here" */ name: string; } /** - * @interface - * An interface representing NameAvailability. - * Result of the request to check name availability. It contains a flag and - * possible reason of failure. - * + * Result of the request to check name availability. It contains a flag and possible reason of + * failure. */ export interface NameAvailability { /** - * @member {boolean} [nameAvailable] Indicates whether the name is available - * or not. + * Indicates whether the name is available or not. */ nameAvailable?: boolean; /** - * @member {string} [reason] The reason of the availability. Required if name - * is not available. + * The reason of the availability. Required if name is not available. */ reason?: string; /** - * @member {string} [message] The message of the operation. + * The message of the operation. */ message?: string; } /** - * @interface - * An interface representing ResourceSku. - * The billing information of the resource.(e.g. basic vs. standard) - * + * The billing information of the SignalR resource. */ export interface ResourceSku { /** - * @member {string} name The name of the SKU. This is typically a letter + - * number code, such as A0 or P3. Required (if sku is specified) + * The name of the SKU. Required. + * + * Allowed values: Standard_S1, Free_F1 */ name: string; /** - * @member {SignalRSkuTier} [tier] Optional tier of this particular SKU. - * `Basic` is deprecated, use `Standard` instead for Basic tier. Possible - * values include: 'Free', 'Basic', 'Standard', 'Premium' + * Optional tier of this particular SKU. 'Standard' or 'Free'. + * + * `Basic` is deprecated, use `Standard` instead. Possible values include: 'Free', 'Basic', + * 'Standard', 'Premium' */ tier?: SignalRSkuTier; /** - * @member {string} [size] Optional, string. When the name field is the - * combination of tier and some other value, this would be the standalone - * code. + * Optional string. For future use. */ size?: string; /** - * @member {string} [family] Optional, string. If the service has different - * generations of hardware, for the same SKU, then that can be captured here. + * Optional string. For future use. */ family?: string; /** - * @member {number} [capacity] Optional, integer. If the SKU supports scale - * out/in then the capacity integer should be included. If scale out/in is - * not - * possible for the resource this may be omitted. + * Optional, integer. The unit count of SignalR resource. 1 by default. + * + * If present, following values are allowed: + * Free: 1 + * Standard: 1,2,5,10,20,50,100 */ capacity?: number; } /** - * @interface - * An interface representing Resource. * The core properties of ARM resources. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Fully qualified resource Id for the resource. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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; /** - * @member {string} [name] The name of the resouce. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] The type of the service - e.g. - * "Microsoft.SignalRService/SignalR" - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The type of the service - e.g. "Microsoft.SignalRService/SignalR" + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing TrackedResource. * The resource model definition for a ARM tracked top level resource. - * - * @extends Resource */ export interface TrackedResource extends Resource { /** - * @member {string} [location] The GEO location of the SignalR service. e.g. - * West US | East US | North Central US | South Central US. + * The GEO location of the SignalR service. e.g. West US | East US | North Central US | South + * Central US. */ location?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Tags of the service - * which is a list of key value pairs that describe the resource. + * Tags of the service which is a list of key value pairs that describe the resource. */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing SignalRResource. * A class represent a SignalR service resource. - * - * @extends TrackedResource */ export interface SignalRResource extends TrackedResource { /** - * @member {ResourceSku} [sku] SKU of the service. + * SKU of the service. */ sku?: ResourceSku; /** - * @member {string} [hostNamePrefix] Prefix for the hostName of the SignalR - * service. Retained for future use. - * The hostname will be of format: - * <hostNamePrefix>.service.signalr.net. + * Prefix for the hostName of the SignalR service. Retained for future use. + * The hostname will be of format: <hostNamePrefix>.service.signalr.net. */ hostNamePrefix?: string; /** - * @member {ProvisioningState} [provisioningState] Provisioning state of the - * resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', + * List of SignalR featureFlags. e.g. ServiceMode. + * + * FeatureFlags that are not included in the parameters for the update operation will not be + * modified. + * And the response will only include featureFlags that are explicitly set. + * When a featureFlag is not explicitly set, SignalR service will use its globally default value. + * But keep in mind, the default value doesn't mean "false". It varies in terms of different + * FeatureFlags. + */ + features?: SignalRFeature[]; + /** + * Cross-Origin Resource Sharing (CORS) settings. + */ + cors?: SignalRCorsSettings; + /** + * Provisioning state of the resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', * 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: ProvisioningState; /** - * @member {string} [externalIP] The publicly accessible IP of the SignalR - * service. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The publicly accessible IP of the SignalR service. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly externalIP?: string; /** - * @member {string} [hostName] FQDN of the SignalR service instance. Format: - * xxx.service.signalr.net - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * FQDN of the SignalR service instance. Format: xxx.service.signalr.net + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly hostName?: string; /** - * @member {number} [publicPort] The publicly accessibly port of the SignalR - * service which is designed for browser/client side usage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The publicly accessible port of the SignalR service which is designed for browser/client side + * usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly publicPort?: number; /** - * @member {number} [serverPort] The publicly accessibly port of the SignalR - * service which is designed for customer server side usage. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The publicly accessible port of the SignalR service which is designed for customer server side + * usage. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly serverPort?: number; /** - * @member {string} [version] Version of the SignalR resource. Probably you - * need the same or higher version of client SDKs. + * Version of the SignalR resource. Probably you need the same or higher version of client SDKs. */ version?: string; } /** - * @interface - * An interface representing SignalRCreateOrUpdateProperties. + * Feature of a SignalR resource, which controls the SignalR runtime behavior. + */ +export interface SignalRFeature { + /** + * Value of the feature flag. See Azure SignalR service document + * https://docs.microsoft.com/en-us/azure/azure-signalr/ for allowed values. + */ + value: string; + /** + * Optional properties related to this feature. + */ + properties?: { [propertyName: string]: string }; +} + +/** + * Cross-Origin Resource Sharing (CORS) settings. + */ +export interface SignalRCorsSettings { + /** + * Gets or sets the list of origins that should be allowed to make cross-origin calls (for + * example: http://example.com:12345). Use "*" to allow all. If omitted, allow all by default. + */ + allowedOrigins?: string[]; +} + +/** * Settings used to provision or configure the resource. - * */ export interface SignalRCreateOrUpdateProperties { /** - * @member {string} [hostNamePrefix] Prefix for the hostName of the SignalR - * service. Retained for future use. - * The hostname will be of format: - * <hostNamePrefix>.service.signalr.net. + * Prefix for the hostName of the SignalR service. Retained for future use. + * The hostname will be of format: <hostNamePrefix>.service.signalr.net. */ hostNamePrefix?: string; + /** + * List of SignalR featureFlags. e.g. ServiceMode. + * + * FeatureFlags that are not included in the parameters for the update operation will not be + * modified. + * And the response will only include featureFlags that are explicitly set. + * When a featureFlag is not explicitly set, SignalR service will use its globally default value. + * But keep in mind, the default value doesn't mean "false". It varies in terms of different + * FeatureFlags. + */ + features?: SignalRFeature[]; + /** + * Cross-Origin Resource Sharing (CORS) settings. + */ + cors?: SignalRCorsSettings; } /** - * @interface - * An interface representing SignalRKeys. * A class represents the access keys of SignalR service. - * */ export interface SignalRKeys { /** - * @member {string} [primaryKey] The primary access key. + * The primary access key. */ primaryKey?: string; /** - * @member {string} [secondaryKey] The secondary access key. + * The secondary access key. */ secondaryKey?: string; /** - * @member {string} [primaryConnectionString] SignalR connection string - * constructed via the primaryKey + * SignalR connection string constructed via the primaryKey */ primaryConnectionString?: string; /** - * @member {string} [secondaryConnectionString] SignalR connection string - * constructed via the secondaryKey + * SignalR connection string constructed via the secondaryKey */ secondaryConnectionString?: string; } /** - * @interface - * An interface representing RegenerateKeyParameters. * Parameters describes the request to regenerate access keys - * */ export interface RegenerateKeyParameters { /** - * @member {KeyType} [keyType] The keyType to regenerate. Must be either - * 'primary' or 'secondary'(case-insensitive). Possible values include: - * 'Primary', 'Secondary' + * The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). Possible + * values include: 'Primary', 'Secondary' */ keyType?: KeyType; } /** - * @interface - * An interface representing SignalRUpdateParameters. * Parameters for SignalR service update operation - * */ export interface SignalRUpdateParameters { /** - * @member {{ [propertyName: string]: string }} [tags] A list of key value - * pairs that describe the resource. + * A list of key value pairs that describe the resource. */ tags?: { [propertyName: string]: string }; /** - * @member {ResourceSku} [sku] The billing information of the resource.(e.g. - * basic vs. standard) + * The billing information of the resource.(e.g. basic vs. standard) */ sku?: ResourceSku; /** - * @member {SignalRCreateOrUpdateProperties} [properties] Settings used to - * provision or configure the resource + * Settings used to provision or configure the resource */ properties?: SignalRCreateOrUpdateProperties; } /** - * @interface - * An interface representing SignalRCreateParameters. * Parameters for SignalR service create/update operation. * * Keep the same schema as AzSignalR.Models.SignalRResource - * - * @extends SignalRUpdateParameters */ export interface SignalRCreateParameters extends SignalRUpdateParameters { /** - * @member {string} location Azure GEO region: e.g. West US | East US | North - * Central US | South Central US | West Europe | North Europe | East Asia | - * Southeast Asia | etc. + * Azure GEO region: e.g. West US | East US | North Central US | South Central US | West Europe | + * North Europe | East Asia | Southeast Asia | etc. * The geo region of a resource never changes after it is created. */ location: string; } /** - * @interface - * An interface representing SignalRUsageName. * Localizable String object containing the name and a localized value. - * */ export interface SignalRUsageName { /** - * @member {string} [value] The indentifier of the usage. + * The identifier of the usage. */ value?: string; /** - * @member {string} [localizedValue] Localized name of the usage. + * Localized name of the usage. */ localizedValue?: string; } /** - * @interface - * An interface representing SignalRUsage. * Object that describes a specific usage of SignalR resources. - * */ export interface SignalRUsage { /** - * @member {string} [id] Fully qualified ARM resource id + * Fully qualified ARM resource id */ id?: string; /** - * @member {number} [currentValue] Current value for the usage quota. + * Current value for the usage quota. */ currentValue?: number; /** - * @member {number} [limit] The maximum permitted value for the usage quota. - * If there is no limit, this value will be -1. + * The maximum permitted value for the usage quota. If there is no limit, this value will be -1. */ limit?: number; /** - * @member {SignalRUsageName} [name] Localizable String object containing the - * name and a localized value. + * Localizable String object containing the name and a localized value. */ name?: SignalRUsageName; /** - * @member {string} [unit] Representing the units of the usage quota. - * Possible values are: Count, Bytes, Seconds, Percent, CountPerSecond, - * BytesPerSecond. + * Representing the units of the usage quota. Possible values are: Count, Bytes, Seconds, + * Percent, CountPerSecond, BytesPerSecond. */ unit?: string; } /** - * @interface - * An interface representing SignalRCheckNameAvailabilityOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface SignalRCheckNameAvailabilityOptionalParams extends msRest.RequestOptionsBase { /** - * @member {NameAvailabilityParameters} [parameters] Parameters supplied to - * the operation. + * Parameters supplied to the operation. */ parameters?: NameAvailabilityParameters; } /** - * @interface - * An interface representing SignalRRegenerateKeyOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface SignalRRegenerateKeyOptionalParams extends msRest.RequestOptionsBase { /** - * @member {RegenerateKeyParameters} [parameters] Parameter that describes - * the Regenerate Key Operation. + * Parameter that describes the Regenerate Key Operation. */ parameters?: RegenerateKeyParameters; } /** - * @interface - * An interface representing SignalRCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface SignalRCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SignalRCreateParameters} [parameters] Parameters for the create - * or update operation + * Parameters for the create or update operation */ parameters?: SignalRCreateParameters; } /** - * @interface - * An interface representing SignalRUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface SignalRUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SignalRUpdateParameters} [parameters] Parameters for the update - * operation + * Parameters for the update operation */ parameters?: SignalRUpdateParameters; } /** - * @interface - * An interface representing SignalRBeginRegenerateKeyOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface SignalRBeginRegenerateKeyOptionalParams extends msRest.RequestOptionsBase { /** - * @member {RegenerateKeyParameters} [parameters] Parameter that describes - * the Regenerate Key Operation. + * Parameter that describes the Regenerate Key Operation. */ parameters?: RegenerateKeyParameters; } /** - * @interface - * An interface representing SignalRBeginCreateOrUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface SignalRBeginCreateOrUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SignalRCreateParameters} [parameters] Parameters for the create - * or update operation + * Parameters for the create or update operation */ parameters?: SignalRCreateParameters; } /** - * @interface - * An interface representing SignalRBeginUpdateOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface SignalRBeginUpdateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {SignalRUpdateParameters} [parameters] Parameters for the update - * operation + * Parameters for the update operation */ parameters?: SignalRUpdateParameters; } /** - * @interface * An interface representing SignalRManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface SignalRManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the OperationList. - * Result of the request to list REST API operations. It contains a list of - * operations. - * + * Result of the request to list REST API operations. It contains a list of operations. * @extends Array */ export interface OperationList extends Array { /** - * @member {string} [nextLink] The URL the client should use to fetch the - * next page (per server side paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ nextLink?: string; @@ -658,16 +559,12 @@ export interface OperationList extends Array { /** * @interface - * An interface representing the SignalRResourceList. - * Object that includes an array of SignalR services and a possible link for - * next set. - * + * Object that includes an array of SignalR services and a possible link for next set. * @extends Array */ export interface SignalRResourceList extends Array { /** - * @member {string} [nextLink] The URL the client should use to fetch the - * next page (per server side paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ nextLink?: string; @@ -675,16 +572,12 @@ export interface SignalRResourceList extends Array { /** * @interface - * An interface representing the SignalRUsageList. - * Object that includes an array of SignalR resource usages and a possible link - * for next set. - * + * Object that includes an array of SignalR resource usages and a possible link for next set. * @extends Array */ export interface SignalRUsageList extends Array { /** - * @member {string} [nextLink] The URL the client should use to fetch the - * next page (per server side paging). + * The URL the client should use to fetch the next page (per server side paging). * It's null for now, added for future use. */ nextLink?: string; @@ -715,94 +608,6 @@ export type ProvisioningState = 'Unknown' | 'Succeeded' | 'Failed' | 'Canceled' */ export type KeyType = 'Primary' | 'Secondary'; -/** - * Defines values for ApiVersion. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion1. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion1 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion2. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion2 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion3. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion3 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion4. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion4 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion5. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion5 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion6. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion6 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion7. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion7 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion8. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion8 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion9. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion9 = '2018-03-01-preview' | '2018-10-01'; - -/** - * Defines values for ApiVersion10. - * Possible values include: '2018-03-01-preview', '2018-10-01' - * @readonly - * @enum {string} - */ -export type ApiVersion10 = '2018-03-01-preview' | '2018-10-01'; - /** * Contains response data for the list operation. */ @@ -815,6 +620,7 @@ export type OperationsListResponse = OperationList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -834,6 +640,7 @@ export type OperationsListNextResponse = OperationList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -853,6 +660,7 @@ export type SignalRCheckNameAvailabilityResponse = NameAvailability & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -872,6 +680,7 @@ export type SignalRListBySubscriptionResponse = SignalRResourceList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -891,6 +700,7 @@ export type SignalRListByResourceGroupResponse = SignalRResourceList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -910,6 +720,7 @@ export type SignalRListKeysResponse = SignalRKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -929,6 +740,7 @@ export type SignalRRegenerateKeyResponse = SignalRKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -948,6 +760,7 @@ export type SignalRGetResponse = SignalRResource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -967,6 +780,7 @@ export type SignalRCreateOrUpdateResponse = SignalRResource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -986,6 +800,7 @@ export type SignalRUpdateResponse = SignalRResource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1005,6 +820,7 @@ export type SignalRBeginRegenerateKeyResponse = SignalRKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1024,6 +840,7 @@ export type SignalRBeginCreateOrUpdateResponse = SignalRResource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1043,6 +860,7 @@ export type SignalRBeginUpdateResponse = SignalRResource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1062,6 +880,7 @@ export type SignalRListBySubscriptionNextResponse = SignalRResourceList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1081,6 +900,7 @@ export type SignalRListByResourceGroupNextResponse = SignalRResourceList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1100,6 +920,7 @@ export type UsagesListResponse = SignalRUsageList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1119,6 +940,7 @@ export type UsagesListNextResponse = SignalRUsageList & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ diff --git a/sdk/signalr/arm-signalr/src/models/mappers.ts b/sdk/signalr/arm-signalr/src/models/mappers.ts index f672cadc85b5..cfd0174cb50a 100644 --- a/sdk/signalr/arm-signalr/src/models/mappers.ts +++ b/sdk/signalr/arm-signalr/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -393,6 +391,25 @@ export const SignalRResource: msRest.CompositeMapper = { name: "String" } }, + features: { + serializedName: "properties.features", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignalRFeature" + } + } + } + }, + cors: { + serializedName: "properties.cors", + type: { + name: "Composite", + className: "SignalRCorsSettings" + } + }, provisioningState: { readOnly: true, serializedName: "properties.provisioningState", @@ -438,6 +455,68 @@ export const SignalRResource: msRest.CompositeMapper = { } }; +export const SignalRFeature: msRest.CompositeMapper = { + serializedName: "SignalRFeature", + type: { + name: "Composite", + className: "SignalRFeature", + modelProperties: { + flag: { + required: true, + isConstant: true, + serializedName: "flag", + defaultValue: 'ServiceMode', + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + constraints: { + MaxLength: 128, + MinLength: 1 + }, + type: { + name: "String" + } + }, + properties: { + serializedName: "properties", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const SignalRCorsSettings: msRest.CompositeMapper = { + serializedName: "SignalRCorsSettings", + type: { + name: "Composite", + className: "SignalRCorsSettings", + modelProperties: { + allowedOrigins: { + serializedName: "allowedOrigins", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const SignalRCreateOrUpdateProperties: msRest.CompositeMapper = { serializedName: "SignalRCreateOrUpdateProperties", type: { @@ -449,6 +528,25 @@ export const SignalRCreateOrUpdateProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + features: { + serializedName: "features", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SignalRFeature" + } + } + } + }, + cors: { + serializedName: "cors", + type: { + name: "Composite", + className: "SignalRCorsSettings" + } } } } diff --git a/sdk/signalr/arm-signalr/src/models/operationsMappers.ts b/sdk/signalr/arm-signalr/src/models/operationsMappers.ts index d93e18a3f028..0c08e4126240 100644 --- a/sdk/signalr/arm-signalr/src/models/operationsMappers.ts +++ b/sdk/signalr/arm-signalr/src/models/operationsMappers.ts @@ -1,21 +1,18 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationList, + CloudError, + Dimension, + MetricSpecification, Operation, OperationDisplay, + OperationList, OperationProperties, - ServiceSpecification, - MetricSpecification, - Dimension, - CloudError + ServiceSpecification } from "../models/mappers"; - diff --git a/sdk/signalr/arm-signalr/src/models/signalRMappers.ts b/sdk/signalr/arm-signalr/src/models/signalRMappers.ts index 0696fbf4de7c..ab52ff22bc82 100644 --- a/sdk/signalr/arm-signalr/src/models/signalRMappers.ts +++ b/sdk/signalr/arm-signalr/src/models/signalRMappers.ts @@ -1,27 +1,26 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - NameAvailabilityParameters, - NameAvailability, + BaseResource, CloudError, - SignalRResourceList, - SignalRResource, - TrackedResource, + NameAvailability, + NameAvailabilityParameters, + RegenerateKeyParameters, Resource, - BaseResource, ResourceSku, - SignalRKeys, - RegenerateKeyParameters, + SignalRCorsSettings, + SignalRCreateOrUpdateProperties, SignalRCreateParameters, + SignalRFeature, + SignalRKeys, + SignalRResource, + SignalRResourceList, SignalRUpdateParameters, - SignalRCreateOrUpdateProperties + TrackedResource } from "../models/mappers"; - diff --git a/sdk/signalr/arm-signalr/src/models/usagesMappers.ts b/sdk/signalr/arm-signalr/src/models/usagesMappers.ts index 0b672776f340..eb4103f06fe6 100644 --- a/sdk/signalr/arm-signalr/src/models/usagesMappers.ts +++ b/sdk/signalr/arm-signalr/src/models/usagesMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - SignalRUsageList, + CloudError, SignalRUsage, - SignalRUsageName, - CloudError + SignalRUsageList, + SignalRUsageName } from "../models/mappers"; - diff --git a/sdk/signalr/arm-signalr/src/operations/signalR.ts b/sdk/signalr/arm-signalr/src/operations/signalR.ts index fca3f4028825..acb3200beeba 100644 --- a/sdk/signalr/arm-signalr/src/operations/signalR.ts +++ b/sdk/signalr/arm-signalr/src/operations/signalR.ts @@ -233,6 +233,19 @@ export class SignalR { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Operation to restart a SignalR service. + * @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 resourceName The name of the SignalR resource. + * @param [options] The optional parameters + * @returns Promise + */ + restart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginRestart(resourceGroupName,resourceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** * Regenerate SignalR service access key. PrimaryKey and SecondaryKey cannot be regenerated at the * same time. @@ -310,6 +323,25 @@ export class SignalR { options); } + /** + * Operation to restart a SignalR service. + * @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 resourceName The name of the SignalR resource. + * @param [options] The optional parameters + * @returns Promise + */ + beginRestart(resourceGroupName: string, resourceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + resourceName, + options + }, + beginRestartOperationSpec, + options); + } + /** * Handles requests to list all resources in a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -474,7 +506,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -531,7 +563,7 @@ const beginRegenerateKeyOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -564,7 +596,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -588,7 +620,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { const beginUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/SignalR/{resourceName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -619,6 +651,30 @@ const beginUpdateOperationSpec: msRest.OperationSpec = { serializer }; +const beginRestartOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.resourceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", diff --git a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts index 9552ff25fe77..989f634e26e2 100644 --- a/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts +++ b/sdk/signalr/arm-signalr/src/signalRManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-signalr"; -const packageVersion = "0.1.0"; +const packageVersion = "2.0.0"; export class SignalRManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials;