Skip to content

Commit 57e4b20

Browse files
author
SDKAuto
committed
CodeGen from PR 15417 in Azure/azure-rest-api-specs
Merge 3e1538958f5f39a34fa41540cc5931fff5652a27 into 7cc0a47e7808f3247c71cda25b7c1da8503272ba
1 parent 33602ff commit 57e4b20

File tree

7 files changed

+30
-29
lines changed

7 files changed

+30
-29
lines changed

sdk/redisenterprise/arm-redisenterprisecache/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Azure RedisEnterpriseManagementClient SDK for JavaScript
22

3-
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for RedisEnterpriseManagementClient.
3+
This package contains an isomorphic SDK (runs both in node.js and in browsers) for RedisEnterpriseManagementClient.
44

55
### Currently supported environments
66

77
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
8-
- Latest versions of Safari, Chrome, Edge, and Firefox.
8+
- Latest versions of Safari, Chrome, Edge and Firefox.
99

1010
### Prerequisites
1111

@@ -21,7 +21,6 @@ Install both packages using the below command:
2121
```bash
2222
npm install --save @azure/arm-redisenterprisecache @azure/identity
2323
```
24-
2524
> **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.
2625
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.
2726

@@ -37,7 +36,6 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/
3736

3837
In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
3938
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.
40-
4139
#### nodejs - Authentication, client creation, and list operations as an example written in JavaScript.
4240

4341
##### Sample code
@@ -51,7 +49,6 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
5149
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
5250
const creds = new DefaultAzureCredential();
5351
const client = new RedisEnterpriseManagementClient(creds, subscriptionId);
54-
5552
client.operations.list().then((result) => {
5653
console.log("The result is:");
5754
console.log(result);
@@ -86,7 +83,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
8683
const credential = new InteractiveBrowserCredential(
8784
{
8885
clientId: "<client id for your Azure AD app>",
89-
tenantId: "<optional tenant for your organization>"
86+
tenant: "<optional tenant for your organization>"
9087
});
9188
const client = new Azure.ArmRedisenterprisecache.RedisEnterpriseManagementClient(creds, subscriptionId);
9289
client.operations.list().then((result) => {

sdk/redisenterprise/arm-redisenterprisecache/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"rollup-plugin-sourcemaps": "^0.4.2",
2828
"uglify-js": "^3.6.0"
2929
},
30-
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redisenterprise/arm-redisenterprisecache",
30+
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/redisenterprise/arm-redisenterprisecache",
3131
"repository": {
3232
"type": "git",
3333
"url": "https://github.com/Azure/azure-sdk-for-js.git"

sdk/redisenterprise/arm-redisenterprisecache/src/models/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,13 +392,13 @@ export interface RegenerateKeyParameters {
392392

393393
/**
394394
* Parameters for a Redis Enterprise import operation.
395-
* @summary Import an RDB file into a target database
395+
* @summary Import RDB files into a target database
396396
*/
397397
export interface ImportClusterParameters {
398398
/**
399-
* SAS URI for the target blob to import from
399+
* SAS URIs for the target blobs to import from
400400
*/
401-
sasUri: string;
401+
sasUris: string[];
402402
}
403403

404404
/**

sdk/redisenterprise/arm-redisenterprisecache/src/models/mappers.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,16 @@ export const ImportClusterParameters: msRest.CompositeMapper = {
585585
name: "Composite",
586586
className: "ImportClusterParameters",
587587
modelProperties: {
588-
sasUri: {
588+
sasUris: {
589589
required: true,
590-
serializedName: "sasUri",
590+
serializedName: "sasUris",
591591
type: {
592-
name: "String"
592+
name: "Sequence",
593+
element: {
594+
type: {
595+
name: "String"
596+
}
597+
}
593598
}
594599
}
595600
}

sdk/redisenterprise/arm-redisenterprisecache/src/models/parameters.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ export const resourceGroupName: msRest.OperationURLParameter = {
100100
serializedName: "resourceGroupName",
101101
constraints: {
102102
MaxLength: 90,
103-
MinLength: 1,
104-
Pattern: /^[-\w\._\(\)]+$/
103+
MinLength: 1
105104
},
106105
type: {
107106
name: "String"

sdk/redisenterprise/arm-redisenterprisecache/src/operations/databases.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,16 @@ export class Databases {
186186
}
187187

188188
/**
189-
* Imports a database file to target database.
189+
* Imports database files to target database.
190190
* @param resourceGroupName The name of the resource group. The name is case insensitive.
191191
* @param clusterName The name of the RedisEnterprise cluster.
192192
* @param databaseName The name of the database.
193-
* @param sasUri SAS URI for the target blob to import from
193+
* @param sasUris SAS URIs for the target blobs to import from
194194
* @param [options] The optional parameters
195195
* @returns Promise<msRest.RestResponse>
196196
*/
197-
importMethod(resourceGroupName: string, clusterName: string, databaseName: string, sasUri: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
198-
return this.beginImportMethod(resourceGroupName,clusterName,databaseName,sasUri,options)
197+
importMethod(resourceGroupName: string, clusterName: string, databaseName: string, sasUris: string[], options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
198+
return this.beginImportMethod(resourceGroupName,clusterName,databaseName,sasUris,options)
199199
.then(lroPoller => lroPoller.pollUntilFinished());
200200
}
201201

@@ -300,21 +300,21 @@ export class Databases {
300300
}
301301

302302
/**
303-
* Imports a database file to target database.
303+
* Imports database files to target database.
304304
* @param resourceGroupName The name of the resource group. The name is case insensitive.
305305
* @param clusterName The name of the RedisEnterprise cluster.
306306
* @param databaseName The name of the database.
307-
* @param sasUri SAS URI for the target blob to import from
307+
* @param sasUris SAS URIs for the target blobs to import from
308308
* @param [options] The optional parameters
309309
* @returns Promise<msRestAzure.LROPoller>
310310
*/
311-
beginImportMethod(resourceGroupName: string, clusterName: string, databaseName: string, sasUri: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
311+
beginImportMethod(resourceGroupName: string, clusterName: string, databaseName: string, sasUris: string[], options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
312312
return this.client.sendLRORequest(
313313
{
314314
resourceGroupName,
315315
clusterName,
316316
databaseName,
317-
sasUri,
317+
sasUris,
318318
options
319319
},
320320
beginImportMethodOperationSpec,
@@ -600,7 +600,7 @@ const beginImportMethodOperationSpec: msRest.OperationSpec = {
600600
],
601601
requestBody: {
602602
parameterPath: {
603-
sasUri: "sasUri"
603+
sasUris: "sasUris"
604604
},
605605
mapper: {
606606
...Mappers.ImportClusterParameters,

sdk/redisenterprise/arm-redisenterprisecache/src/redisEnterpriseManagementClientContext.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
import * as Models from "./models";
1111
import * as msRest from "@azure/ms-rest-js";
12-
import { TokenCredential } from "@azure/core-auth";
1312
import * as msRestAzure from "@azure/ms-rest-azure-js";
13+
import { TokenCredential } from "@azure/core-auth";
1414

1515
const packageName = "@azure/arm-redisenterprisecache";
1616
const packageVersion = "1.1.0";
@@ -42,25 +42,25 @@ export class RedisEnterpriseManagementClientContext extends msRestAzure.AzureSer
4242
if (!options) {
4343
options = {};
4444
}
45-
if(!options.userAgent) {
45+
if (!options.userAgent) {
4646
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
4747
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
4848
}
4949

5050
super(credentials, options);
5151

52-
this.apiVersion = '2021-03-01';
52+
this.apiVersion = '2021-08-01';
5353
this.acceptLanguage = 'en-US';
5454
this.longRunningOperationRetryTimeout = 30;
5555
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
5656
this.requestContentType = "application/json; charset=utf-8";
5757
this.credentials = credentials;
5858
this.subscriptionId = subscriptionId;
5959

60-
if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
60+
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
6161
this.acceptLanguage = options.acceptLanguage;
6262
}
63-
if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
63+
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
6464
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
6565
}
6666
}

0 commit comments

Comments
 (0)