Skip to content

Commit 86316e6

Browse files
author
SDKAuto
committed
CodeGen from PR 20620 in Azure/azure-rest-api-specs
Merge fdf1b6ac262c93c2ea527b25340a139b53c7d668 into 79776c8ff0fb29c7e1f43daec925a1b91ef196b0
1 parent 9f2a8de commit 86316e6

File tree

10 files changed

+102
-84
lines changed

10 files changed

+102
-84
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/redis/arm-rediscache/CHANGELOG.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
# Release History
2+
3+
## 8.0.0 (2022-09-07)
4+
5+
**Breaking Changes**
26

3-
## 7.0.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
7+
- Operation PatchSchedules.createOrUpdate has a new signature
8+
9+
1310
## 7.0.0 (2022-09-05)
1411

1512
**Features**
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"commit": "fbe1a37cc8f1e8d2dc31f781fffdbaef4c370fa6",
2+
"commit": "71b73b23bf11365fde5c707cc52faa91de5101cd",
33
"readme": "specification/redis/resource-manager/readme.md",
4-
"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/typescript@6.0.0-rc.1.20220727.1 --generate-sample=true",
4+
"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/typescript@6.0.0-rc.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
66
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.2",
7-
"use": "@autorest/typescript@6.0.0-rc.1.20220727.1"
7+
"use": "@autorest/typescript@6.0.0-rc.1"
88
}

sdk/redis/arm-rediscache/package.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for RedisManagementClient.",
6-
"version": "7.0.1",
6+
"version": "8.0.0",
77
"engines": {
88
"node": ">=12.0.0"
99
},
@@ -36,7 +36,7 @@
3636
"mkdirp": "^1.0.4",
3737
"rollup": "^2.66.1",
3838
"rollup-plugin-sourcemaps": "^0.6.3",
39-
"typescript": "~4.6.0",
39+
"typescript": "~4.2.0",
4040
"uglify-js": "^3.4.9",
4141
"rimraf": "^3.0.0",
4242
"@azure/identity": "^2.0.1",
@@ -46,8 +46,7 @@
4646
"@types/chai": "^4.2.8",
4747
"chai": "^4.2.0",
4848
"cross-env": "^7.0.2",
49-
"@azure/dev-tool": "^1.0.0",
50-
"@azure/arm-network": "^26.0.0"
49+
"@azure/dev-tool": "^1.0.0"
5150
},
5251
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redis/arm-rediscache",
5352
"repository": {
@@ -110,13 +109,5 @@
110109
}
111110
]
112111
},
113-
"autoPublish": true,
114-
"//sampleConfiguration": {
115-
"productName": "",
116-
"productSlugs": [
117-
"azure"
118-
],
119-
"disableDocsMs": true,
120-
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-rediscache?view=azure-node-preview"
121-
}
122-
}
112+
"autoPublish": true
113+
}

sdk/redis/arm-rediscache/review/arm-rediscache.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ export interface OperationStatusResult {
322322

323323
// @public
324324
export interface PatchSchedules {
325-
createOrUpdate(resourceGroupName: string, name: string, defaultParam: DefaultName, parameters: RedisPatchSchedule, options?: PatchSchedulesCreateOrUpdateOptionalParams): Promise<PatchSchedulesCreateOrUpdateResponse>;
325+
createOrUpdate(resourceGroupName: string, name: string, parameters: RedisPatchSchedule, defaultParam: DefaultName, options?: PatchSchedulesCreateOrUpdateOptionalParams): Promise<PatchSchedulesCreateOrUpdateResponse>;
326326
delete(resourceGroupName: string, name: string, defaultParam: DefaultName, options?: PatchSchedulesDeleteOptionalParams): Promise<void>;
327327
get(resourceGroupName: string, name: string, defaultParam: DefaultName, options?: PatchSchedulesGetOptionalParams): Promise<PatchSchedulesGetResponse>;
328328
listByRedisResource(resourceGroupName: string, cacheName: string, options?: PatchSchedulesListByRedisResourceOptionalParams): PagedAsyncIterableIterator<RedisPatchSchedule>;

sdk/redis/arm-rediscache/src/operations/patchSchedules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ export class PatchSchedulesImpl implements PatchSchedules {
131131
* Create or replace the patching schedule for Redis cache.
132132
* @param resourceGroupName The name of the resource group.
133133
* @param name The name of the Redis cache.
134-
* @param defaultParam Default string modeled as parameter for auto generation to work correctly.
135134
* @param parameters Parameters to set the patching schedule for Redis cache.
135+
* @param defaultParam Default string modeled as parameter for auto generation to work correctly.
136136
* @param options The options parameters.
137137
*/
138138
createOrUpdate(
139139
resourceGroupName: string,
140140
name: string,
141-
defaultParam: DefaultName,
142141
parameters: RedisPatchSchedule,
142+
defaultParam: DefaultName,
143143
options?: PatchSchedulesCreateOrUpdateOptionalParams
144144
): Promise<PatchSchedulesCreateOrUpdateResponse> {
145145
return this.client.sendOperationRequest(

sdk/redis/arm-rediscache/src/operationsInterfaces/patchSchedules.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ export interface PatchSchedules {
3636
* Create or replace the patching schedule for Redis cache.
3737
* @param resourceGroupName The name of the resource group.
3838
* @param name The name of the Redis cache.
39-
* @param defaultParam Default string modeled as parameter for auto generation to work correctly.
4039
* @param parameters Parameters to set the patching schedule for Redis cache.
40+
* @param defaultParam Default string modeled as parameter for auto generation to work correctly.
4141
* @param options The options parameters.
4242
*/
4343
createOrUpdate(
4444
resourceGroupName: string,
4545
name: string,
46-
defaultParam: DefaultName,
4746
parameters: RedisPatchSchedule,
47+
defaultParam: DefaultName,
4848
options?: PatchSchedulesCreateOrUpdateOptionalParams
4949
): Promise<PatchSchedulesCreateOrUpdateResponse>;
5050
/**

sdk/redis/arm-rediscache/src/redisManagementClient.ts

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class RedisManagementClient extends coreClient.ServiceClient {
6969
credential: credentials
7070
};
7171

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

92-
let bearerTokenAuthenticationPolicyFound: boolean = false;
9392
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
9493
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
95-
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
94+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
9695
(pipelinePolicy) =>
9796
pipelinePolicy.name ===
9897
coreRestPipeline.bearerTokenAuthenticationPolicyName
9998
);
100-
}
101-
if (
102-
!options ||
103-
!options.pipeline ||
104-
options.pipeline.getOrderedPolicies().length == 0 ||
105-
!bearerTokenAuthenticationPolicyFound
106-
) {
107-
this.pipeline.removePolicy({
108-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
109-
});
110-
this.pipeline.addPolicy(
111-
coreRestPipeline.bearerTokenAuthenticationPolicy({
112-
credential: credentials,
113-
scopes: `${optionsWithDefaults.credentialScopes}`,
114-
challengeCallbacks: {
115-
authorizeRequestOnChallenge:
116-
coreClient.authorizeRequestOnClaimChallenge
117-
}
118-
})
119-
);
99+
if (!bearerTokenAuthenticationPolicyFound) {
100+
this.pipeline.removePolicy({
101+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
102+
});
103+
this.pipeline.addPolicy(
104+
coreRestPipeline.bearerTokenAuthenticationPolicy({
105+
scopes: `${optionsWithDefaults.baseUri}/.default`,
106+
challengeCallbacks: {
107+
authorizeRequestOnChallenge:
108+
coreClient.authorizeRequestOnClaimChallenge
109+
}
110+
})
111+
);
112+
}
120113
}
121114
// Parameter assignments
122115
this.subscriptionId = subscriptionId;

0 commit comments

Comments
 (0)