Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions sdk/redis/arm-rediscache/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Release History

## 8.0.0 (2022-09-22)

**Breaking Changes**

## 7.0.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Operation PatchSchedules.createOrUpdate has a new signature


## 7.0.0 (2022-09-05)

**Features**
Expand Down
2 changes: 1 addition & 1 deletion sdk/redis/arm-rediscache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ REST API for Azure Redis Cache Service.

### Currently supported environments

- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge and Firefox.

See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
Expand Down
6 changes: 3 additions & 3 deletions sdk/redis/arm-rediscache/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "fbe1a37cc8f1e8d2dc31f781fffdbaef4c370fa6",
"commit": "79d07fd1403d95b05a08f5f0cf3432a6edff6813",
"readme": "specification/redis/resource-manager/readme.md",
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\redis\\resource-manager\\readme.md --use=@autorest/[email protected].20220727.1 --generate-sample=true",
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/redis/resource-manager/readme.md --use=@autorest/[email protected]",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/[email protected]",
"use": "@autorest/[email protected].20220727.1"
"use": "@autorest/[email protected]"
}
19 changes: 5 additions & 14 deletions sdk/redis/arm-rediscache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for RedisManagementClient.",
"version": "7.0.1",
"version": "8.0.0",
"engines": {
"node": ">=12.0.0"
},
Expand Down Expand Up @@ -36,7 +36,7 @@
"mkdirp": "^1.0.4",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.6.0",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
Expand All @@ -46,8 +46,7 @@
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@azure/dev-tool": "^1.0.0",
"@azure/arm-network": "^26.0.0"
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redis/arm-rediscache",
"repository": {
Expand Down Expand Up @@ -110,13 +109,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-rediscache?view=azure-node-preview"
}
}
"autoPublish": true
}
2 changes: 1 addition & 1 deletion sdk/redis/arm-rediscache/review/arm-rediscache.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ export interface OperationStatusResult {

// @public
export interface PatchSchedules {
createOrUpdate(resourceGroupName: string, name: string, defaultParam: DefaultName, parameters: RedisPatchSchedule, options?: PatchSchedulesCreateOrUpdateOptionalParams): Promise<PatchSchedulesCreateOrUpdateResponse>;
createOrUpdate(resourceGroupName: string, name: string, parameters: RedisPatchSchedule, defaultParam: DefaultName, options?: PatchSchedulesCreateOrUpdateOptionalParams): Promise<PatchSchedulesCreateOrUpdateResponse>;
delete(resourceGroupName: string, name: string, defaultParam: DefaultName, options?: PatchSchedulesDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, name: string, defaultParam: DefaultName, options?: PatchSchedulesGetOptionalParams): Promise<PatchSchedulesGetResponse>;
listByRedisResource(resourceGroupName: string, cacheName: string, options?: PatchSchedulesListByRedisResourceOptionalParams): PagedAsyncIterableIterator<RedisPatchSchedule>;
Expand Down
4 changes: 2 additions & 2 deletions sdk/redis/arm-rediscache/src/operations/patchSchedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ export class PatchSchedulesImpl implements PatchSchedules {
* Create or replace the patching schedule for Redis cache.
* @param resourceGroupName The name of the resource group.
* @param name The name of the Redis cache.
* @param defaultParam Default string modeled as parameter for auto generation to work correctly.
* @param parameters Parameters to set the patching schedule for Redis cache.
* @param defaultParam Default string modeled as parameter for auto generation to work correctly.
* @param options The options parameters.
*/
createOrUpdate(
resourceGroupName: string,
name: string,
defaultParam: DefaultName,
parameters: RedisPatchSchedule,
defaultParam: DefaultName,
options?: PatchSchedulesCreateOrUpdateOptionalParams
): Promise<PatchSchedulesCreateOrUpdateResponse> {
return this.client.sendOperationRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export interface PatchSchedules {
* Create or replace the patching schedule for Redis cache.
* @param resourceGroupName The name of the resource group.
* @param name The name of the Redis cache.
* @param defaultParam Default string modeled as parameter for auto generation to work correctly.
* @param parameters Parameters to set the patching schedule for Redis cache.
* @param defaultParam Default string modeled as parameter for auto generation to work correctly.
* @param options The options parameters.
*/
createOrUpdate(
resourceGroupName: string,
name: string,
defaultParam: DefaultName,
parameters: RedisPatchSchedule,
defaultParam: DefaultName,
options?: PatchSchedulesCreateOrUpdateOptionalParams
): Promise<PatchSchedulesCreateOrUpdateResponse>;
/**
Expand Down
39 changes: 16 additions & 23 deletions sdk/redis/arm-rediscache/src/redisManagementClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class RedisManagementClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-rediscache/7.0.1`;
const packageDetails = `azsdk-js-arm-rediscache/8.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand All @@ -89,34 +89,27 @@ export class RedisManagementClient extends coreClient.ServiceClient {
};
super(optionsWithDefaults);

let bearerTokenAuthenticationPolicyFound: boolean = false;
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
}
if (
!options ||
!options.pipeline ||
options.pipeline.getOrderedPolicies().length == 0 ||
!bearerTokenAuthenticationPolicyFound
) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
credential: credentials,
scopes: `${optionsWithDefaults.credentialScopes}`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
// Parameter assignments
this.subscriptionId = subscriptionId;
Expand Down
43 changes: 43 additions & 0 deletions sdk/redis/arm-rediscache/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

import {
Recorder,
RecorderStartOptions,
env
} from "@azure-tools/test-recorder";
import { assert } from "chai";
import { Context } from "mocha";

const replaceableVariables: Record<string, string> = {
AZURE_CLIENT_ID: "azure_client_id",
AZURE_CLIENT_SECRET: "azure_client_secret",
AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
SUBSCRIPTION_ID: "azure_subscription_id"
};

const recorderOptions: RecorderStartOptions = {
envSetupForPlayback: replaceableVariables
};

describe("My test", () => {
let recorder: Recorder;

beforeEach(async function(this: Context) {
recorder = new Recorder(this.currentTest);
await recorder.start(recorderOptions);
});

afterEach(async function() {
await recorder.stop();
});

it("sample test", async function() {
console.log("Hi, I'm a test!");
});
});
10 changes: 2 additions & 8 deletions sdk/redis/arm-rediscache/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@
],
"declaration": true,
"outDir": "./dist-esm",
"importHelpers": true,
"paths": {
"@azure/arm-rediscache": [
"./src/index"
]
}
"importHelpers": true
},
"include": [
"./src/**/*.ts",
"./test/**/*.ts",
"samples-dev/**/*.ts"
"./test/**/*.ts"
],
"exclude": [
"node_modules"
Expand Down