diff --git a/sdk/support/arm-support/LICENSE.txt b/sdk/support/arm-support/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/support/arm-support/LICENSE.txt +++ b/sdk/support/arm-support/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/support/arm-support/README.md b/sdk/support/arm-support/README.md index 967c7b23d6d9..32cbb9a3c4c1 100644 --- a/sdk/support/arm-support/README.md +++ b/sdk/support/arm-support/README.md @@ -1,90 +1,97 @@ ## Azure MicrosoftSupport SDK for JavaScript -This package contains an isomorphic SDK for MicrosoftSupport. +This package contains an isomorphic SDK (runs both in node.js and in browsers) for MicrosoftSupport. ### Currently supported environments -- Node.js version 6.x.x or higher -- Browser JavaScript +- [LTS versions of Node.js](https://nodejs.org/about/releases/) +- Latest versions of Safari, Chrome, Edge and Firefox. -### How to Install +### Prerequisites +You must have an [Azure subscription](https://azure.microsoft.com/free/). + +### How to install + +To use this SDK in your project, you will need to install two packages. +- `@azure/arm-support` that contains the client. +- `@azure/identity` that provides different mechanisms for the client to authenticate your requests using Azure Active Directory. + +Install both packages using the below command: ```bash -npm install @azure/arm-support +npm install --save @azure/arm-support @azure/identity ``` +> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features. +If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options. ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +- If you are writing a client side browser application, + - Follow the instructions in the section on Authenticating client side browser applications in [Azure Identity examples](https://aka.ms/azsdk/js/identity/examples) to register your application in the Microsoft identity platform and set the right permissions. + - Copy the client ID and tenant ID from the Overview section of your app registration in Azure portal and use it in the browser sample below. +- If you are writing a server side application, + - [Select a credential from `@azure/identity` based on the authentication method of your choice](https://aka.ms/azsdk/js/identity/examples) + - Complete the set up steps required by the credential if any. + - Use the credential you picked in the place of `DefaultAzureCredential` in the Node.js sample below. -##### Install @azure/ms-rest-nodeauth - -- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. -```bash -npm install @azure/ms-rest-nodeauth@"^3.0.0" -``` +In the below samples, we pass the credential and the Azure subscription id to instantiate the client. +Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started. +#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript. ##### Sample code -```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 { MicrosoftSupport, MicrosoftSupportModels, MicrosoftSupportMappers } from "@azure/arm-support"; +```javascript +const { DefaultAzureCredential } = require("@azure/identity"); +const { MicrosoftSupport } = require("@azure/arm-support"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new MicrosoftSupport(creds, subscriptionId); - client.operations.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); +// Use `DefaultAzureCredential` or any other credential of your choice based on https://aka.ms/azsdk/js/identity/examples +// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead. +const creds = new DefaultAzureCredential(); +const client = new MicrosoftSupport(creds, subscriptionId); +client.operations.list().then((result) => { + console.log("The result is:"); + console.log(result); }).catch((err) => { + console.log("An error occurred:"); console.error(err); }); ``` -#### browser - Authentication, client creation and list operations as an example written in JavaScript. +#### browser - Authentication, client creation, and list operations as an example written in JavaScript. -##### Install @azure/ms-rest-browserauth - -```bash -npm install @azure/ms-rest-browserauth -``` +In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser. + - See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser. + - Note down the client Id from the previous step and use it in the browser sample below. ##### Sample code -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - - index.html + ```html @azure/arm-support sample - - + diff --git a/sdk/support/arm-support/package.json b/sdk/support/arm-support/package.json index 275ea5195a21..918b148de646 100644 --- a/sdk/support/arm-support/package.json +++ b/sdk/support/arm-support/package.json @@ -4,8 +4,9 @@ "description": "MicrosoftSupport Library with typescript type definitions for node.js and browser.", "version": "1.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^2.0.1", - "@azure/ms-rest-js": "^2.0.4", + "@azure/ms-rest-azure-js": "^2.1.0", + "@azure/ms-rest-js": "^2.2.0", + "@azure/core-auth": "^1.1.4", "tslib": "^1.10.0" }, "keywords": [ @@ -20,13 +21,13 @@ "module": "./esm/microsoftSupport.js", "types": "./esm/microsoftSupport.d.ts", "devDependencies": { - "typescript": "^3.5.3", + "typescript": "^3.6.0", "rollup": "^1.18.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/support/arm-support", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/support/arm-support", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" diff --git a/sdk/support/arm-support/rollup.config.js b/sdk/support/arm-support/rollup.config.js index d1cdb7454709..36f83fc9790f 100644 --- a/sdk/support/arm-support/rollup.config.js +++ b/sdk/support/arm-support/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/support/arm-support/src/microsoftSupport.ts b/sdk/support/arm-support/src/microsoftSupport.ts index 4b52aeb0dd1e..d4e11e9b5763 100644 --- a/sdk/support/arm-support/src/microsoftSupport.ts +++ b/sdk/support/arm-support/src/microsoftSupport.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 @@ -9,6 +8,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import { TokenCredential } from "@azure/core-auth"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; import * as operations from "./operations"; @@ -25,11 +25,16 @@ class MicrosoftSupport extends MicrosoftSupportContext { /** * Initializes a new instance of the MicrosoftSupport class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); this.services = new operations.Services(this); diff --git a/sdk/support/arm-support/src/microsoftSupportContext.ts b/sdk/support/arm-support/src/microsoftSupportContext.ts index 2ba89d1d59f5..a6cd14b14afc 100644 --- a/sdk/support/arm-support/src/microsoftSupportContext.ts +++ b/sdk/support/arm-support/src/microsoftSupportContext.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 @@ -11,22 +10,28 @@ import * as Models from "./models"; import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; +import { TokenCredential } from "@azure/core-auth"; const packageName = "@azure/arm-support"; const packageVersion = "1.0.0"; export class MicrosoftSupportContext extends msRestAzure.AzureServiceClient { - credentials: msRest.ServiceClientCredentials; + credentials: msRest.ServiceClientCredentials | TokenCredential; subscriptionId: string; apiVersion?: string; /** * Initializes a new instance of the MicrosoftSupport class. - * @param credentials Credentials needed for the client to connect to Azure. + * @param credentials Credentials needed for the client to connect to Azure. Credentials + * implementing the TokenCredential interface from the @azure/identity package are recommended. For + * more information about these credentials, see + * {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the + * ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and + * @azure/ms-rest-browserauth are also supported. * @param subscriptionId Azure subscription Id. * @param [options] The parameter options */ - constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { + constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, subscriptionId: string, options?: Models.MicrosoftSupportOptions) { if (credentials == undefined) { throw new Error('\'credentials\' cannot be null.'); } @@ -37,7 +42,7 @@ export class MicrosoftSupportContext extends msRestAzure.AzureServiceClient { if (!options) { options = {}; } - if(!options.userAgent) { + if (!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -52,10 +57,10 @@ export class MicrosoftSupportContext extends msRestAzure.AzureServiceClient { this.credentials = credentials; this.subscriptionId = subscriptionId; - if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/support/arm-support/src/models/communicationsMappers.ts b/sdk/support/arm-support/src/models/communicationsMappers.ts index 1fe4bc2a7c5a..dd56c54f19ea 100644 --- a/sdk/support/arm-support/src/models/communicationsMappers.ts +++ b/sdk/support/arm-support/src/models/communicationsMappers.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. diff --git a/sdk/support/arm-support/src/models/index.ts b/sdk/support/arm-support/src/models/index.ts index 0a2c2da2c521..696b6548825e 100644 --- a/sdk/support/arm-support/src/models/index.ts +++ b/sdk/support/arm-support/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. @@ -310,8 +310,9 @@ export interface SupportTicketDetails extends BaseResource { /** * A value that indicates the urgency of the case, which in turn determines the response time * according to the service level agreement of the technical support plan you have with Azure. - * Note: 'Highest critical impact' severity is reserved only for our Premium customers. Possible - * values include: 'minimal', 'moderate', 'critical', 'highestcriticalimpact' + * Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the + * Azure portal is reserved only for our Premium customers. Possible values include: 'minimal', + * 'moderate', 'critical', 'highestcriticalimpact' */ severity: SeverityLevel; /** @@ -569,6 +570,24 @@ export interface SupportTicketsListOptionalParams extends msRest.RequestOptionsB filter?: string; } +/** + * Optional Parameters. + */ +export interface SupportTicketsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of values to return in the collection. Default is 25 and max is 100. + */ + top?: number; + /** + * The filter to apply on the operation. We support 'odata v4.0' filter semantics. [Learn + * more](https://docs.microsoft.com/odata/concepts/queryoptions-overview). _Status_ filter can + * only be used with Equals ('eq') operator. For _CreatedDate_ filter, the supported operators + * are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both filters, combine + * them using the logical 'AND'. + */ + filter?: string; +} + /** * Optional Parameters. */ @@ -586,6 +605,23 @@ export interface CommunicationsListOptionalParams extends msRest.RequestOptionsB filter?: string; } +/** + * Optional Parameters. + */ +export interface CommunicationsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of values to return in the collection. Default is 10 and max is 10. + */ + top?: number; + /** + * The filter to apply on the operation. You can filter by communicationType and createdDate + * properties. CommunicationType supports Equals ('eq') operator and createdDate supports Greater + * Than ('gt') and Greater Than or Equals ('ge') operators. You may combine the CommunicationType + * and CreatedDate filters by Logical And ('and') operator. + */ + filter?: string; +} + /** * An interface representing MicrosoftSupportOptions. */ diff --git a/sdk/support/arm-support/src/models/mappers.ts b/sdk/support/arm-support/src/models/mappers.ts index 548fdd7e7103..5c89a860ccfe 100644 --- a/sdk/support/arm-support/src/models/mappers.ts +++ b/sdk/support/arm-support/src/models/mappers.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. diff --git a/sdk/support/arm-support/src/models/operationsMappers.ts b/sdk/support/arm-support/src/models/operationsMappers.ts index b6e72b14c6ce..ed5d233aa2d6 100644 --- a/sdk/support/arm-support/src/models/operationsMappers.ts +++ b/sdk/support/arm-support/src/models/operationsMappers.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. diff --git a/sdk/support/arm-support/src/models/parameters.ts b/sdk/support/arm-support/src/models/parameters.ts index aafb28438615..1f8bf5d0dbd4 100644 --- a/sdk/support/arm-support/src/models/parameters.ts +++ b/sdk/support/arm-support/src/models/parameters.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/support/arm-support/src/models/problemClassificationsMappers.ts b/sdk/support/arm-support/src/models/problemClassificationsMappers.ts index 0df8bd073f1f..f7398025651b 100644 --- a/sdk/support/arm-support/src/models/problemClassificationsMappers.ts +++ b/sdk/support/arm-support/src/models/problemClassificationsMappers.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. diff --git a/sdk/support/arm-support/src/models/servicesMappers.ts b/sdk/support/arm-support/src/models/servicesMappers.ts index 69ec00ba73a6..11f61cfbc992 100644 --- a/sdk/support/arm-support/src/models/servicesMappers.ts +++ b/sdk/support/arm-support/src/models/servicesMappers.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. diff --git a/sdk/support/arm-support/src/models/supportTicketsMappers.ts b/sdk/support/arm-support/src/models/supportTicketsMappers.ts index 25fe954adb6c..9d4554ac6eb2 100644 --- a/sdk/support/arm-support/src/models/supportTicketsMappers.ts +++ b/sdk/support/arm-support/src/models/supportTicketsMappers.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. diff --git a/sdk/support/arm-support/src/operations/communications.ts b/sdk/support/arm-support/src/operations/communications.ts index ce7693cb8649..ef124c872ce8 100644 --- a/sdk/support/arm-support/src/operations/communications.ts +++ b/sdk/support/arm-support/src/operations/communications.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 @@ -65,8 +64,8 @@ export class Communications { * also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the * $filter parameter. The only type of communication supported today is _Web_. Output will be a * paged result with _nextLink_, using which you can retrieve the next set of Communication - * results.

Support ticket data is available for 12 months after ticket creation. If a - * ticket was created more than 12 months ago, a request for data might cause an error. + * results.

Support ticket data is available for 18 months after ticket creation. If a + * ticket was created more than 18 months ago, a request for data might cause an error. * @param supportTicketName Support ticket name. * @param [options] The optional parameters * @returns Promise @@ -163,13 +162,13 @@ export class Communications { * also filter support ticket communications by _CreatedDate_ or _CommunicationType_ using the * $filter parameter. The only type of communication supported today is _Web_. Output will be a * paged result with _nextLink_, using which you can retrieve the next set of Communication - * results.

Support ticket data is available for 12 months after ticket creation. If a - * ticket was created more than 12 months ago, a request for data might cause an error. + * results.

Support ticket data is available for 18 months after ticket creation. If a + * ticket was created more than 18 months ago, a request for data might cause an error. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.CommunicationsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -180,8 +179,8 @@ export class Communications { * @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: Models.CommunicationsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.CommunicationsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -316,6 +315,11 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.filter, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/support/arm-support/src/operations/index.ts b/sdk/support/arm-support/src/operations/index.ts index c3dc4a3c928e..c4f4e13ddede 100644 --- a/sdk/support/arm-support/src/operations/index.ts +++ b/sdk/support/arm-support/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/support/arm-support/src/operations/operations.ts b/sdk/support/arm-support/src/operations/operations.ts index a92e538c1c82..051e0b699e22 100644 --- a/sdk/support/arm-support/src/operations/operations.ts +++ b/sdk/support/arm-support/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 diff --git a/sdk/support/arm-support/src/operations/problemClassifications.ts b/sdk/support/arm-support/src/operations/problemClassifications.ts index a853ea0add74..a1f6c249fe92 100644 --- a/sdk/support/arm-support/src/operations/problemClassifications.ts +++ b/sdk/support/arm-support/src/operations/problemClassifications.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/support/arm-support/src/operations/services.ts b/sdk/support/arm-support/src/operations/services.ts index c7d891a03a0d..45ed40852789 100644 --- a/sdk/support/arm-support/src/operations/services.ts +++ b/sdk/support/arm-support/src/operations/services.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/support/arm-support/src/operations/supportTickets.ts b/sdk/support/arm-support/src/operations/supportTickets.ts index b6c2eeb6c063..df0d6b1c01d7 100644 --- a/sdk/support/arm-support/src/operations/supportTickets.ts +++ b/sdk/support/arm-support/src/operations/supportTickets.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 @@ -60,8 +59,8 @@ export class SupportTickets { * Lists all the support tickets for an Azure subscription. You can also filter the support tickets * by _Status_ or _CreatedDate_ using the $filter parameter. Output will be a paged result with * _nextLink_, using which you can retrieve the next set of support tickets.

Support - * ticket data is available for 12 months after ticket creation. If a ticket was created more than - * 12 months ago, a request for data might cause an error. + * ticket data is available for 18 months after ticket creation. If a ticket was created more than + * 18 months ago, a request for data might cause an error. * @param [options] The optional parameters * @returns Promise */ @@ -85,8 +84,8 @@ export class SupportTickets { } /** - * Get ticket details for an Azure subscription. Support ticket data is available for 12 months - * after ticket creation. If a ticket was created more than 12 months ago, a request for data might + * Get ticket details for an Azure subscription. Support ticket data is available for 18 months + * after ticket creation. If a ticket was created more than 18 months ago, a request for data might * cause an error. * @param supportTicketName Support ticket name. * @param [options] The optional parameters @@ -220,13 +219,13 @@ export class SupportTickets { * Lists all the support tickets for an Azure subscription. You can also filter the support tickets * by _Status_ or _CreatedDate_ using the $filter parameter. Output will be a paged result with * _nextLink_, using which you can retrieve the next set of support tickets.

Support - * ticket data is available for 12 months after ticket creation. If a ticket was created more than - * 12 months ago, a request for data might cause an error. + * ticket data is available for 18 months after ticket creation. If a ticket was created more than + * 18 months ago, a request for data might cause an error. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.SupportTicketsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -237,8 +236,8 @@ export class SupportTickets { * @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: Models.SupportTicketsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.SupportTicketsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -400,6 +399,11 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.filter, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ],