Skip to content

Commit

Permalink
CodeGen from PR 23835 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Update 2023-05-01-preview version with changes from 2023-04-01 version. (Azure#23835)
  • Loading branch information
SDKAuto committed May 9, 2023
1 parent 4022610 commit a124e6e
Show file tree
Hide file tree
Showing 18 changed files with 258 additions and 173 deletions.
8 changes: 4 additions & 4 deletions common/config/rush/pnpm-lock.yaml

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

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

## 7.2.0 (2023-05-09)

**Features**

## 7.1.2 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Interface ExportRDBParameters has a new optional parameter storageSubscriptionId
- Interface ImportRDBParameters has a new optional parameter storageSubscriptionId
- Interface RedisCommonPropertiesRedisConfiguration has a new optional parameter storageSubscriptionId

## 7.1.1 (2023-01-31)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/redis/arm-rediscache/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "794b03f1b40b6f7646528fbe06bcfce7b58223a9",
"commit": "4a7af0df86022e5e6cc6e8f40ca1981c4557a4bc",
"readme": "specification/redis/resource-manager/readme.md",
"autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\redis\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --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.10",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.0",
"use": "@autorest/typescript@6.0.0-rc.7"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
"use": "@autorest/typescript@6.0.0-rc.10"
}
27 changes: 9 additions & 18 deletions sdk/redis/arm-rediscache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for RedisManagementClient.",
"version": "7.1.2",
"version": "7.2.0",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.2.0",
"@azure/core-lro": "^2.5.0",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.6.1",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
Expand All @@ -33,13 +33,13 @@
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-multi-entry": "^6.0.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"mkdirp": "^2.1.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~5.0.0",
"typescript": "~4.8.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"dotenv": "^8.2.0",
"dotenv": "^16.0.0",
"@azure/identity": "^2.0.1",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
Expand All @@ -48,8 +48,7 @@
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/arm-network": "^26.0.0"
"@azure/dev-tool": "^1.0.0"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -112,13 +111,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redis/arm-rediscache",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-rediscache?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/redis/arm-rediscache"
}
23 changes: 13 additions & 10 deletions sdk/redis/arm-rediscache/review/arm-rediscache.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import * as coreAuth from '@azure/core-auth';
import * as coreClient from '@azure/core-client';
import { OperationState } from '@azure/core-lro';
import { PagedAsyncIterableIterator } from '@azure/core-paging';
import { PollerLike } from '@azure/core-lro';
import { PollOperationState } from '@azure/core-lro';
import { SimplePollerLike } from '@azure/core-lro';

// @public
export interface AsyncOperationStatus {
Expand Down Expand Up @@ -69,6 +69,7 @@ export interface ExportRDBParameters {
format?: string;
preferredDataArchiveAuthMethod?: string;
prefix: string;
storageSubscriptionId?: string;
}

// @public
Expand Down Expand Up @@ -119,6 +120,7 @@ export interface ImportRDBParameters {
files: string[];
format?: string;
preferredDataArchiveAuthMethod?: string;
storageSubscriptionId?: string;
}

// @public
Expand Down Expand Up @@ -202,9 +204,9 @@ export enum KnownTlsVersion {

// @public
export interface LinkedServer {
beginCreate(resourceGroupName: string, name: string, linkedServerName: string, parameters: RedisLinkedServerCreateParameters, options?: LinkedServerCreateOptionalParams): Promise<PollerLike<PollOperationState<LinkedServerCreateResponse>, LinkedServerCreateResponse>>;
beginCreate(resourceGroupName: string, name: string, linkedServerName: string, parameters: RedisLinkedServerCreateParameters, options?: LinkedServerCreateOptionalParams): Promise<SimplePollerLike<OperationState<LinkedServerCreateResponse>, LinkedServerCreateResponse>>;
beginCreateAndWait(resourceGroupName: string, name: string, linkedServerName: string, parameters: RedisLinkedServerCreateParameters, options?: LinkedServerCreateOptionalParams): Promise<LinkedServerCreateResponse>;
beginDelete(resourceGroupName: string, name: string, linkedServerName: string, options?: LinkedServerDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDelete(resourceGroupName: string, name: string, linkedServerName: string, options?: LinkedServerDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, name: string, linkedServerName: string, options?: LinkedServerDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, name: string, linkedServerName: string, options?: LinkedServerGetOptionalParams): Promise<LinkedServerGetResponse>;
list(resourceGroupName: string, name: string, options?: LinkedServerListOptionalParams): PagedAsyncIterableIterator<RedisLinkedServerWithProperties>;
Expand Down Expand Up @@ -385,7 +387,7 @@ export type PrivateEndpointConnectionProvisioningState = string;

// @public
export interface PrivateEndpointConnections {
beginPut(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsPutOptionalParams): Promise<PollerLike<PollOperationState<PrivateEndpointConnectionsPutResponse>, PrivateEndpointConnectionsPutResponse>>;
beginPut(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsPutOptionalParams): Promise<SimplePollerLike<OperationState<PrivateEndpointConnectionsPutResponse>, PrivateEndpointConnectionsPutResponse>>;
beginPutAndWait(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsPutOptionalParams): Promise<PrivateEndpointConnectionsPutResponse>;
delete(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise<PrivateEndpointConnectionsGetResponse>;
Expand Down Expand Up @@ -468,15 +470,15 @@ export type RebootType = string;

// @public
export interface Redis {
beginCreate(resourceGroupName: string, name: string, parameters: RedisCreateParameters, options?: RedisCreateOptionalParams): Promise<PollerLike<PollOperationState<RedisCreateResponse>, RedisCreateResponse>>;
beginCreate(resourceGroupName: string, name: string, parameters: RedisCreateParameters, options?: RedisCreateOptionalParams): Promise<SimplePollerLike<OperationState<RedisCreateResponse>, RedisCreateResponse>>;
beginCreateAndWait(resourceGroupName: string, name: string, parameters: RedisCreateParameters, options?: RedisCreateOptionalParams): Promise<RedisCreateResponse>;
beginDelete(resourceGroupName: string, name: string, options?: RedisDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDelete(resourceGroupName: string, name: string, options?: RedisDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, name: string, options?: RedisDeleteOptionalParams): Promise<void>;
beginExportData(resourceGroupName: string, name: string, parameters: ExportRDBParameters, options?: RedisExportDataOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginExportData(resourceGroupName: string, name: string, parameters: ExportRDBParameters, options?: RedisExportDataOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginExportDataAndWait(resourceGroupName: string, name: string, parameters: ExportRDBParameters, options?: RedisExportDataOptionalParams): Promise<void>;
beginImportData(resourceGroupName: string, name: string, parameters: ImportRDBParameters, options?: RedisImportDataOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginImportData(resourceGroupName: string, name: string, parameters: ImportRDBParameters, options?: RedisImportDataOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginImportDataAndWait(resourceGroupName: string, name: string, parameters: ImportRDBParameters, options?: RedisImportDataOptionalParams): Promise<void>;
beginUpdate(resourceGroupName: string, name: string, parameters: RedisUpdateParameters, options?: RedisUpdateOptionalParams): Promise<PollerLike<PollOperationState<RedisUpdateResponse>, RedisUpdateResponse>>;
beginUpdate(resourceGroupName: string, name: string, parameters: RedisUpdateParameters, options?: RedisUpdateOptionalParams): Promise<SimplePollerLike<OperationState<RedisUpdateResponse>, RedisUpdateResponse>>;
beginUpdateAndWait(resourceGroupName: string, name: string, parameters: RedisUpdateParameters, options?: RedisUpdateOptionalParams): Promise<RedisUpdateResponse>;
checkNameAvailability(parameters: CheckNameAvailabilityParameters, options?: RedisCheckNameAvailabilityOptionalParams): Promise<void>;
forceReboot(resourceGroupName: string, name: string, parameters: RedisRebootParameters, options?: RedisForceRebootOptionalParams): Promise<RedisForceRebootOperationResponse>;
Expand Down Expand Up @@ -531,6 +533,7 @@ export interface RedisCommonPropertiesRedisConfiguration {
rdbBackupFrequency?: string;
rdbBackupMaxSnapshotCount?: string;
rdbStorageConnectionString?: string;
storageSubscriptionId?: string;
readonly zonalConfiguration?: string;
}

Expand Down
54 changes: 31 additions & 23 deletions sdk/redis/arm-rediscache/src/lroImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,37 @@
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { AbortSignalLike } from "@azure/abort-controller";
import { LongRunningOperation, LroResponse } from "@azure/core-lro";

export class LroImpl<T> implements LongRunningOperation<T> {
constructor(
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
private args: Record<string, unknown>,
private spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>,
public requestPath: string = spec.path!,
public requestMethod: string = spec.httpMethod
) {}
public async sendInitialRequest(): Promise<LroResponse<T>> {
return this.sendOperationFn(this.args, this.spec);
}
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
const { requestBody, ...restSpec } = this.spec;
return this.sendOperationFn(this.args, {
...restSpec,
path,
httpMethod: "GET"
});
}
export function createLroSpec<T>(inputs: {
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
args: Record<string, unknown>;
spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>;
}): LongRunningOperation<T> {
const { args, spec, sendOperationFn } = inputs;
return {
requestMethod: spec.httpMethod,
requestPath: spec.path!,
sendInitialRequest: () => sendOperationFn(args, spec),
sendPollRequest: (
path: string,
options?: { abortSignal?: AbortSignalLike }
) => {
const { requestBody, ...restSpec } = spec;
return sendOperationFn(args, {
...restSpec,
httpMethod: "GET",
path,
abortSignal: options?.abortSignal
});
}
};
}
6 changes: 6 additions & 0 deletions sdk/redis/arm-rediscache/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ export interface RedisCommonPropertiesRedisConfiguration {
readonly zonalConfiguration?: string;
/** Specifies whether the authentication is disabled. Setting this property is highly discouraged from security point of view. */
authnotrequired?: string;
/** SubscriptionId of the storage account for persistence (aof/rdb) using ManagedIdentity. */
storageSubscriptionId?: string;
}

/** Managed service identity (system assigned and/or user assigned identities) */
Expand Down Expand Up @@ -440,6 +442,8 @@ export interface ImportRDBParameters {
files: string[];
/** Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS */
preferredDataArchiveAuthMethod?: string;
/** Subscription id of the storage container containing files to import using Managed Identity. */
storageSubscriptionId?: string;
}

/** Parameters for Redis export operation. */
Expand All @@ -452,6 +456,8 @@ export interface ExportRDBParameters {
container: string;
/** Preferred auth method to communicate to storage account used for data archive, specify SAS or ManagedIdentity, default value is SAS */
preferredDataArchiveAuthMethod?: string;
/** Subscription id of the storage container for data to be exported using ManagedIdentity. */
storageSubscriptionId?: string;
}

/** The response of list firewall rules Redis operation. */
Expand Down
18 changes: 18 additions & 0 deletions sdk/redis/arm-rediscache/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,12 @@ export const RedisCommonPropertiesRedisConfiguration: coreClient.CompositeMapper
type: {
name: "String"
}
},
storageSubscriptionId: {
serializedName: "storage-subscription-id",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -1035,6 +1041,12 @@ export const ImportRDBParameters: coreClient.CompositeMapper = {
type: {
name: "String"
}
},
storageSubscriptionId: {
serializedName: "storage-subscription-id",
type: {
name: "String"
}
}
}
}
Expand Down Expand Up @@ -1070,6 +1082,12 @@ export const ExportRDBParameters: coreClient.CompositeMapper = {
type: {
name: "String"
}
},
storageSubscriptionId: {
serializedName: "storage-subscription-id",
type: {
name: "String"
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/redis/arm-rediscache/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const $host: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2022-06-01",
defaultValue: "2023-04-01",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
Loading

0 comments on commit a124e6e

Please sign in to comment.