From 3d6acbc40aca62047a030b4a37f95acbda6751e0 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 24 Nov 2020 04:13:11 +0000 Subject: [PATCH] CodeGen from PR 11793 in Azure/azure-rest-api-specs Merge 8f6dcce300a0e071507028daa1d9df971225935c into d4d7ea6c660f853323ce6dc0ab9f3c239767169c --- sdk/redis/arm-rediscache/README.md | 9 +- sdk/redis/arm-rediscache/rollup.config.js | 4 +- .../src/models/firewallRulesMappers.ts | 12 +- sdk/redis/arm-rediscache/src/models/index.ts | 333 ++++++++++++++++- .../src/models/linkedServerMappers.ts | 12 +- .../arm-rediscache/src/models/mappers.ts | 335 +++++++++++++++++- .../src/models/operationsMappers.ts | 8 +- .../arm-rediscache/src/models/parameters.ts | 15 +- .../src/models/patchSchedulesMappers.ts | 12 +- .../privateEndpointConnectionsMappers.ts | 31 ++ .../src/models/privateLinkResourcesMappers.ts | 31 ++ .../arm-rediscache/src/models/redisMappers.ts | 12 +- .../src/operations/firewallRules.ts | 58 +-- .../arm-rediscache/src/operations/index.ts | 7 +- .../src/operations/linkedServer.ts | 27 +- .../src/operations/operations.ts | 12 +- .../src/operations/patchSchedules.ts | 32 +- .../operations/privateEndpointConnections.ts | 287 +++++++++++++++ .../src/operations/privateLinkResources.ts | 86 +++++ .../arm-rediscache/src/operations/redis.ts | 97 ++--- .../src/redisManagementClient.ts | 9 +- .../src/redisManagementClientContext.ts | 7 +- 22 files changed, 1283 insertions(+), 153 deletions(-) create mode 100644 sdk/redis/arm-rediscache/src/models/privateEndpointConnectionsMappers.ts create mode 100644 sdk/redis/arm-rediscache/src/models/privateLinkResourcesMappers.ts create mode 100644 sdk/redis/arm-rediscache/src/operations/privateEndpointConnections.ts create mode 100644 sdk/redis/arm-rediscache/src/operations/privateLinkResources.ts diff --git a/sdk/redis/arm-rediscache/README.md b/sdk/redis/arm-rediscache/README.md index 9fd3b180eb27..30a3ab518464 100644 --- a/sdk/redis/arm-rediscache/README.md +++ b/sdk/redis/arm-rediscache/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-rediscache ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - client creation and list operations as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```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 { RedisManagementClient, RedisManagementModels, RedisManagementMappers } from "@azure/arm-rediscache"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { RedisManagementClient } = require("@azure/arm-rediscache"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/redis/arm-rediscache/rollup.config.js b/sdk/redis/arm-rediscache/rollup.config.js index 8d2642be4eba..8f18fe5e7d00 100644 --- a/sdk/redis/arm-rediscache/rollup.config.js +++ b/sdk/redis/arm-rediscache/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/redis/arm-rediscache/src/models/firewallRulesMappers.ts b/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts index cf356274183a..c554fb4c9724 100644 --- a/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/firewallRulesMappers.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. @@ -8,7 +8,13 @@ export { BaseResource, - CloudError, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RedisAccessKeys, RedisFirewallRule, diff --git a/sdk/redis/arm-rediscache/src/models/index.ts b/sdk/redis/arm-rediscache/src/models/index.ts index b61bfc6cd69f..36911c12f347 100644 --- a/sdk/redis/arm-rediscache/src/models/index.ts +++ b/sdk/redis/arm-rediscache/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. @@ -91,6 +91,37 @@ export interface RedisInstanceDetails { readonly isMaster?: boolean; } +/** + * The Private Endpoint resource. + */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; +} + +/** + * A collection of information about the state of the connection between service consumer and + * provider. + */ +export interface PrivateLinkServiceConnectionState { + /** + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. Possible values include: 'Pending', 'Approved', 'Rejected' + */ + status?: PrivateEndpointServiceConnectionStatus; + /** + * The reason for approval/rejection of the connection. + */ + description?: string; + /** + * A message indicating if changes on the service provider require any updates on the consumer. + */ + actionsRequired?: string; +} + /** * The Resource definition. */ @@ -112,6 +143,26 @@ export interface Resource extends BaseResource { readonly type?: string; } +/** + * The Private Endpoint Connection resource. + */ +export interface PrivateEndpointConnection extends Resource { + /** + * The resource of private end point. + */ + privateEndpoint?: PrivateEndpoint; + /** + * A collection of information about the state of the connection between service consumer and + * provider. + */ + privateLinkServiceConnectionState: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. Possible values include: + * 'Succeeded', 'Creating', 'Deleting', 'Failed' + */ + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + /** * The resource model definition for a ARM proxy resource. It will have everything other than * required location and tags @@ -164,6 +215,12 @@ export interface RedisCreateParameters { * '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2' */ minimumTlsVersion?: TlsVersion; + /** + * Whether or not public endpoint access is allowed for this cache. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive + * access method. Default value is 'Enabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; /** * The SKU of the Redis cache to deploy. */ @@ -224,6 +281,12 @@ export interface RedisUpdateParameters { * '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2' */ minimumTlsVersion?: TlsVersion; + /** + * Whether or not public endpoint access is allowed for this cache. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive + * access method. Default value is 'Enabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; /** * The SKU of the Redis cache to deploy. */ @@ -308,6 +371,12 @@ export interface RedisResource extends TrackedResource { * '1.1', '1.2'). Possible values include: '1.0', '1.1', '1.2' */ minimumTlsVersion?: TlsVersion; + /** + * Whether or not public endpoint access is allowed for this cache. Value is optional but if + * passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive + * access method. Default value is 'Enabled'. Possible values include: 'Enabled', 'Disabled' + */ + publicNetworkAccess?: PublicNetworkAccess; /** * The SKU of the Redis cache to deploy. */ @@ -366,6 +435,11 @@ export interface RedisResource extends TrackedResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly instances?: RedisInstanceDetails[]; + /** + * List of private endpoint connection associated with the specified redis cache + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; /** * A list of availability zones denoting where the resource needs to come from. */ @@ -640,6 +714,105 @@ export interface NotificationListResponse { readonly nextLink?: string; } +/** + * The resource management error additional info. + */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly info?: any; +} + +/** + * The error detail. + */ +export interface ErrorDetail { + /** + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.). + * @summary Error response + */ +export interface ErrorResponse { + /** + * The error object. + */ + error?: ErrorDetail; +} + +/** + * Properties of a private link resource. + */ +export interface PrivateLinkResourceProperties { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; +} + +/** + * A private link resource + */ +export interface PrivateLinkResource extends Resource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; + /** + * The private link resource Private link DNS zone name. + */ + requiredZoneNames?: string[]; +} + /** * An interface representing RedisManagementClientOptions. */ @@ -713,6 +886,22 @@ export interface RedisLinkedServerWithPropertiesList extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { +} + +/** + * @interface + * A list of private link resources + * @extends Array + */ +export interface PrivateLinkResourceListResult extends Array { +} + /** * Defines values for SkuName. * Possible values include: 'Basic', 'Standard', 'Premium' @@ -737,6 +926,14 @@ export type SkuFamily = 'C' | 'P'; */ export type TlsVersion = '1.0' | '1.1' | '1.2'; +/** + * Defines values for PublicNetworkAccess. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccess = 'Enabled' | 'Disabled'; + /** * Defines values for ProvisioningState. * Possible values include: 'Creating', 'Deleting', 'Disabled', 'Failed', 'Linking', @@ -747,6 +944,22 @@ export type TlsVersion = '1.0' | '1.1' | '1.2'; */ export type ProvisioningState = 'Creating' | 'Deleting' | 'Disabled' | 'Failed' | 'Linking' | 'Provisioning' | 'RecoveringScaleFailure' | 'Scaling' | 'Succeeded' | 'Unlinking' | 'Unprovisioning' | 'Updating'; +/** + * Defines values for PrivateEndpointServiceConnectionStatus. + * Possible values include: 'Pending', 'Approved', 'Rejected' + * @readonly + * @enum {string} + */ +export type PrivateEndpointServiceConnectionStatus = 'Pending' | 'Approved' | 'Rejected'; + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. + * Possible values include: 'Succeeded', 'Creating', 'Deleting', 'Failed' + * @readonly + * @enum {string} + */ +export type PrivateEndpointConnectionProvisioningState = 'Succeeded' | 'Creating' | 'Deleting' | 'Failed'; + /** * Defines values for RedisKeyType. * Possible values include: 'Primary', 'Secondary' @@ -921,9 +1134,9 @@ export type RedisListByResourceGroupResponse = RedisListResult & { }; /** - * Contains response data for the list operation. + * Contains response data for the listBySubscription operation. */ -export type RedisListResponse = RedisListResult & { +export type RedisListBySubscriptionResponse = RedisListResult & { /** * The underlying HTTP response. */ @@ -1041,9 +1254,9 @@ export type RedisListByResourceGroupNextResponse = RedisListResult & { }; /** - * Contains response data for the listNext operation. + * Contains response data for the listBySubscriptionNext operation. */ -export type RedisListNextResponse = RedisListResult & { +export type RedisListBySubscriptionNextResponse = RedisListResult & { /** * The underlying HTTP response. */ @@ -1061,9 +1274,9 @@ export type RedisListNextResponse = RedisListResult & { }; /** - * Contains response data for the listByRedisResource operation. + * Contains response data for the list operation. */ -export type FirewallRulesListByRedisResourceResponse = RedisFirewallRuleListResult & { +export type FirewallRulesListResponse = RedisFirewallRuleListResult & { /** * The underlying HTTP response. */ @@ -1121,9 +1334,9 @@ export type FirewallRulesGetResponse = RedisFirewallRule & { }; /** - * Contains response data for the listByRedisResourceNext operation. + * Contains response data for the listNext operation. */ -export type FirewallRulesListByRedisResourceNextResponse = RedisFirewallRuleListResult & { +export type FirewallRulesListNextResponse = RedisFirewallRuleListResult & { /** * The underlying HTTP response. */ @@ -1319,3 +1532,103 @@ export type LinkedServerListNextResponse = RedisLinkedServerWithPropertiesList & parsedBody: RedisLinkedServerWithPropertiesList; }; }; + +/** + * Contains response data for the list operation. + */ +export type PrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the put operation. + */ +export type PrivateEndpointConnectionsPutResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the beginPut operation. + */ +export type PrivateEndpointConnectionsBeginPutResponse = PrivateEndpointConnection & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByRedisCache operation. + */ +export type PrivateLinkResourcesListByRedisCacheResponse = PrivateLinkResourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: PrivateLinkResourceListResult; + }; +}; diff --git a/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts b/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts index 8c4b9cc9739d..7b99d59baccd 100644 --- a/sdk/redis/arm-rediscache/src/models/linkedServerMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/linkedServerMappers.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. @@ -8,7 +8,13 @@ export { BaseResource, - CloudError, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RedisAccessKeys, RedisFirewallRule, diff --git a/sdk/redis/arm-rediscache/src/models/mappers.ts b/sdk/redis/arm-rediscache/src/models/mappers.ts index 07812bd8021c..c3a2a4ca4f4c 100644 --- a/sdk/redis/arm-rediscache/src/models/mappers.ts +++ b/sdk/redis/arm-rediscache/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. @@ -129,6 +129,51 @@ export const RedisInstanceDetails: msRest.CompositeMapper = { } }; +export const PrivateEndpoint: msRest.CompositeMapper = { + serializedName: "PrivateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + export const Resource: msRest.CompositeMapper = { serializedName: "Resource", type: { @@ -160,6 +205,38 @@ export const Resource: msRest.CompositeMapper = { } }; +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...Resource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpoint" + } + }, + privateLinkServiceConnectionState: { + required: true, + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + export const ProxyResource: msRest.CompositeMapper = { serializedName: "ProxyResource", type: { @@ -252,6 +329,12 @@ export const RedisCreateParameters: msRest.CompositeMapper = { name: "String" } }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, sku: { required: true, serializedName: "properties.sku", @@ -363,6 +446,12 @@ export const RedisUpdateParameters: msRest.CompositeMapper = { name: "String" } }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, sku: { serializedName: "properties.sku", type: { @@ -511,6 +600,12 @@ export const RedisResource: msRest.CompositeMapper = { name: "String" } }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, sku: { required: true, serializedName: "properties.sku", @@ -606,6 +701,19 @@ export const RedisResource: msRest.CompositeMapper = { } } }, + privateEndpointConnections: { + readOnly: true, + serializedName: "properties.privateEndpointConnections", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, zones: { serializedName: "zones", type: { @@ -1115,6 +1223,185 @@ export const NotificationListResponse: msRest.CompositeMapper = { } }; +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorDetail: msRest.CompositeMapper = { + serializedName: "ErrorDetail", + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail" + } + } + } + } +}; + +export const PrivateLinkResourceProperties: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceProperties", + type: { + name: "Composite", + className: "PrivateLinkResourceProperties", + modelProperties: { + groupId: { + readOnly: true, + serializedName: "groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...Resource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const OperationListResult: msRest.CompositeMapper = { serializedName: "OperationListResult", type: { @@ -1259,3 +1546,47 @@ export const RedisLinkedServerWithPropertiesList: msRest.CompositeMapper = { } } }; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + } + } + } +}; diff --git a/sdk/redis/arm-rediscache/src/models/operationsMappers.ts b/sdk/redis/arm-rediscache/src/models/operationsMappers.ts index 689688180be7..fddc3077d64b 100644 --- a/sdk/redis/arm-rediscache/src/models/operationsMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/operationsMappers.ts @@ -1,13 +1,15 @@ /* - * 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. */ export { - CloudError, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, Operation, OperationDisplay, OperationListResult diff --git a/sdk/redis/arm-rediscache/src/models/parameters.ts b/sdk/redis/arm-rediscache/src/models/parameters.ts index e80292daf04e..e21f3c648ea7 100644 --- a/sdk/redis/arm-rediscache/src/models/parameters.ts +++ b/sdk/redis/arm-rediscache/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 @@ -93,6 +92,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts b/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts index 3f414b53ae84..76dc19427757 100644 --- a/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/patchSchedulesMappers.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. @@ -8,7 +8,13 @@ export { BaseResource, - CloudError, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RedisAccessKeys, RedisFirewallRule, diff --git a/sdk/redis/arm-rediscache/src/models/privateEndpointConnectionsMappers.ts b/sdk/redis/arm-rediscache/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..3caec1134276 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,31 @@ +/* + * 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. + */ + +export { + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateLinkResource, + PrivateLinkServiceConnectionState, + ProxyResource, + RedisAccessKeys, + RedisFirewallRule, + RedisInstanceDetails, + RedisLinkedServer, + RedisLinkedServerWithProperties, + RedisPatchSchedule, + RedisResource, + Resource, + ScheduleEntry, + Sku, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/redis/arm-rediscache/src/models/privateLinkResourcesMappers.ts b/sdk/redis/arm-rediscache/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..0dff7f26a0fb --- /dev/null +++ b/sdk/redis/arm-rediscache/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,31 @@ +/* + * 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. + */ + +export { + BaseResource, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkResourceListResult, + PrivateLinkServiceConnectionState, + ProxyResource, + RedisAccessKeys, + RedisFirewallRule, + RedisInstanceDetails, + RedisLinkedServer, + RedisLinkedServerWithProperties, + RedisPatchSchedule, + RedisResource, + Resource, + ScheduleEntry, + Sku, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/redis/arm-rediscache/src/models/redisMappers.ts b/sdk/redis/arm-rediscache/src/models/redisMappers.ts index 597dbcc9fdc7..02b590f64eae 100644 --- a/sdk/redis/arm-rediscache/src/models/redisMappers.ts +++ b/sdk/redis/arm-rediscache/src/models/redisMappers.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. @@ -9,10 +9,16 @@ export { BaseResource, CheckNameAvailabilityParameters, - CloudError, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, ExportRDBParameters, ImportRDBParameters, NotificationListResponse, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateLinkResource, + PrivateLinkServiceConnectionState, ProxyResource, RedisAccessKeys, RedisCreateParameters, diff --git a/sdk/redis/arm-rediscache/src/operations/firewallRules.ts b/sdk/redis/arm-rediscache/src/operations/firewallRules.ts index 1f26b29976d4..65b6a2dca36b 100644 --- a/sdk/redis/arm-rediscache/src/operations/firewallRules.ts +++ b/sdk/redis/arm-rediscache/src/operations/firewallRules.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 @@ -31,31 +30,31 @@ export class FirewallRules { * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByRedisResource(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; + list(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. * @param callback The callback */ - listByRedisResource(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param cacheName The name of the Redis cache. * @param options The optional parameters * @param callback The callback */ - listByRedisResource(resourceGroupName: string, cacheName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByRedisResource(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(resourceGroupName: string, cacheName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, cacheName, options }, - listByRedisResourceOperationSpec, - callback) as Promise; + listOperationSpec, + callback) as Promise; } /** @@ -174,36 +173,36 @@ export class FirewallRules { * Gets all firewall rules in the specified redis cache. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listByRedisResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listByRedisResourceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listByRedisResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByRedisResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listByRedisResourceNextOperationSpec, - callback) as Promise; + listNextOperationSpec, + callback) as Promise; } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const listByRedisResourceOperationSpec: msRest.OperationSpec = { +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -220,7 +219,7 @@ const listByRedisResourceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisFirewallRuleListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -228,7 +227,7 @@ const listByRedisResourceOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.cacheName, @@ -256,7 +255,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisFirewallRule }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -264,7 +263,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.cacheName, @@ -282,7 +281,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisFirewallRule }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -290,7 +289,7 @@ const getOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/firewallRules/{ruleName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/firewallRules/{ruleName}", urlParameters: [ Parameters.resourceGroupName, Parameters.cacheName, @@ -307,19 +306,22 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listByRedisResourceNextOperationSpec: msRest.OperationSpec = { +const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -328,7 +330,7 @@ const listByRedisResourceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisFirewallRuleListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/redis/arm-rediscache/src/operations/index.ts b/sdk/redis/arm-rediscache/src/operations/index.ts index a2f30803474f..802ed8f58a66 100644 --- a/sdk/redis/arm-rediscache/src/operations/index.ts +++ b/sdk/redis/arm-rediscache/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 @@ -13,3 +12,5 @@ export * from "./redis"; export * from "./firewallRules"; export * from "./patchSchedules"; export * from "./linkedServer"; +export * from "./privateEndpointConnections"; +export * from "./privateLinkResources"; diff --git a/sdk/redis/arm-rediscache/src/operations/linkedServer.ts b/sdk/redis/arm-rediscache/src/operations/linkedServer.ts index a070b31122df..8d02394d1be4 100644 --- a/sdk/redis/arm-rediscache/src/operations/linkedServer.ts +++ b/sdk/redis/arm-rediscache/src/operations/linkedServer.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 @@ -200,7 +199,7 @@ export class LinkedServer { const serializer = new msRest.Serializer(Mappers); const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -215,8 +214,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { ], responses: { 200: {}, + 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -224,7 +224,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -242,7 +242,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisLinkedServerWithProperties }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -250,7 +250,7 @@ const getOperationSpec: msRest.OperationSpec = { const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -267,7 +267,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisLinkedServerWithPropertiesList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -275,7 +275,7 @@ const listOperationSpec: msRest.OperationSpec = { const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/linkedServers/{linkedServerName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/linkedServers/{linkedServerName}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -303,7 +303,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisLinkedServerWithProperties }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -316,6 +316,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -324,7 +327,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisLinkedServerWithPropertiesList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/redis/arm-rediscache/src/operations/operations.ts b/sdk/redis/arm-rediscache/src/operations/operations.ts index 00b63249fdd4..17a6f0ff88f8 100644 --- a/sdk/redis/arm-rediscache/src/operations/operations.ts +++ b/sdk/redis/arm-rediscache/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 @@ -95,7 +94,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -116,7 +118,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/redis/arm-rediscache/src/operations/patchSchedules.ts b/sdk/redis/arm-rediscache/src/operations/patchSchedules.ts index 4e8a39613a00..b51289a2ea9b 100644 --- a/sdk/redis/arm-rediscache/src/operations/patchSchedules.ts +++ b/sdk/redis/arm-rediscache/src/operations/patchSchedules.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 @@ -59,7 +58,7 @@ export class PatchSchedules { } /** - * Create or replace the patching schedule for Redis cache (requires Premium SKU). + * 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 scheduleEntries List of patch schedules for a Redis cache. @@ -95,7 +94,7 @@ export class PatchSchedules { } /** - * Deletes the patching schedule of a redis cache (requires Premium SKU). + * Deletes the patching schedule of a redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param [options] The optional parameters @@ -127,7 +126,7 @@ export class PatchSchedules { } /** - * Gets the patching schedule of a redis cache (requires Premium SKU). + * Gets the patching schedule of a redis cache. * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param [options] The optional parameters @@ -191,7 +190,7 @@ export class PatchSchedules { const serializer = new msRest.Serializer(Mappers); const listByRedisResourceOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{cacheName}/patchSchedules", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/patchSchedules", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, @@ -208,7 +207,7 @@ const listByRedisResourceOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisPatchScheduleListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -216,7 +215,7 @@ const listByRedisResourceOperationSpec: msRest.OperationSpec = { const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -246,7 +245,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisPatchSchedule }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -254,7 +253,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -271,7 +270,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -279,7 +278,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/{default}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/patchSchedules/{default}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -297,7 +296,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisPatchSchedule }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -310,6 +309,9 @@ const listByRedisResourceNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -318,7 +320,7 @@ const listByRedisResourceNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisPatchScheduleListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/redis/arm-rediscache/src/operations/privateEndpointConnections.ts b/sdk/redis/arm-rediscache/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..80d069b66ce3 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operations/privateEndpointConnections.ts @@ -0,0 +1,287 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { RedisManagementClientContext } from "../redisManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: RedisManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {RedisManagementClientContext} client Reference to the service client. + */ + constructor(client: RedisManagementClientContext) { + this.client = client; + } + + /** + * List all the private endpoint connections associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param callback The callback + */ + list(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, cacheName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + cacheName, + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param callback The callback + */ + get(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + cacheName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Update the state of specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + put(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginPut(resourceGroupName,cacheName,privateEndpointConnectionName,properties,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes the specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + cacheName, + privateEndpointConnectionName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Update the state of specified private endpoint connection associated with the redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with + * the Azure resource + * @param properties The private endpoint connection properties. + * @param [options] The optional parameters + * @returns Promise + */ + beginPut(resourceGroupName: string, cacheName: string, privateEndpointConnectionName: string, properties: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + cacheName, + privateEndpointConnectionName, + properties, + options + }, + beginPutOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.privateEndpointConnectionName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginPutOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "properties", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 201: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/redis/arm-rediscache/src/operations/privateLinkResources.ts b/sdk/redis/arm-rediscache/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..cb02a4c57065 --- /dev/null +++ b/sdk/redis/arm-rediscache/src/operations/privateLinkResources.ts @@ -0,0 +1,86 @@ +/* + * 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 * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { RedisManagementClientContext } from "../redisManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: RedisManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {RedisManagementClientContext} client Reference to the service client. + */ + constructor(client: RedisManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a redis cache. + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param [options] The optional parameters + * @returns Promise + */ + listByRedisCache(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param callback The callback + */ + listByRedisCache(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. + * @param cacheName The name of the Redis cache. + * @param options The optional parameters + * @param callback The callback + */ + listByRedisCache(resourceGroupName: string, cacheName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByRedisCache(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + cacheName, + options + }, + listByRedisCacheOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByRedisCacheOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{cacheName}/privateLinkResources", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.cacheName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/redis/arm-rediscache/src/operations/redis.ts b/sdk/redis/arm-rediscache/src/operations/redis.ts index 03ee10850310..6491bc934b2b 100644 --- a/sdk/redis/arm-rediscache/src/operations/redis.ts +++ b/sdk/redis/arm-rediscache/src/operations/redis.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 @@ -218,25 +217,25 @@ export class Redis { /** * Gets all Redis caches in the specified subscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - list(options?: msRest.RequestOptionsBase): Promise; + listBySubscription(options?: msRest.RequestOptionsBase): Promise; /** * @param callback The callback */ - list(callback: msRest.ServiceCallback): void; + listBySubscription(callback: msRest.ServiceCallback): void; /** * @param options The optional parameters * @param callback The callback */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { options }, - listOperationSpec, - callback) as Promise; + listBySubscriptionOperationSpec, + callback) as Promise; } /** @@ -485,28 +484,28 @@ export class Redis { * Gets all Redis caches in the specified subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @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 { + listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, options }, - listNextOperationSpec, - callback) as Promise; + listBySubscriptionNextOperationSpec, + callback) as Promise; } } @@ -534,7 +533,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { responses: { 200: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -542,7 +541,7 @@ const checkNameAvailabilityOperationSpec: msRest.OperationSpec = { const listUpgradeNotificationsOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listUpgradeNotifications", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listUpgradeNotifications", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -560,7 +559,7 @@ const listUpgradeNotificationsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.NotificationListResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -568,7 +567,7 @@ const listUpgradeNotificationsOperationSpec: msRest.OperationSpec = { const updateOperationSpec: msRest.OperationSpec = { httpMethod: "PATCH", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -592,7 +591,7 @@ const updateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -600,7 +599,7 @@ const updateOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -617,7 +616,7 @@ const getOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -625,7 +624,7 @@ const getOperationSpec: msRest.OperationSpec = { const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis", urlParameters: [ Parameters.resourceGroupName, Parameters.subscriptionId @@ -641,15 +640,15 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listOperationSpec: msRest.OperationSpec = { +const listBySubscriptionOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Cache/Redis", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Cache/redis", urlParameters: [ Parameters.subscriptionId ], @@ -664,7 +663,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -672,7 +671,7 @@ const listOperationSpec: msRest.OperationSpec = { const listKeysOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listKeys", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listKeys", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -689,7 +688,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisAccessKeys }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -697,7 +696,7 @@ const listKeysOperationSpec: msRest.OperationSpec = { const regenerateKeyOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/regenerateKey", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/regenerateKey", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -723,7 +722,7 @@ const regenerateKeyOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisAccessKeys }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -731,7 +730,7 @@ const regenerateKeyOperationSpec: msRest.OperationSpec = { const forceRebootOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/forceReboot", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/forceReboot", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -755,7 +754,7 @@ const forceRebootOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisForceRebootResponse }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -763,7 +762,7 @@ const forceRebootOperationSpec: msRest.OperationSpec = { const beginCreateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -790,7 +789,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisResource }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -798,7 +797,7 @@ const beginCreateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -815,7 +814,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -823,7 +822,7 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { const beginImportDataOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/import", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/import", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -847,7 +846,7 @@ const beginImportDataOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -855,7 +854,7 @@ const beginImportDataOperationSpec: msRest.OperationSpec = { const beginExportDataOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/export", urlParameters: [ Parameters.resourceGroupName, Parameters.name, @@ -879,7 +878,7 @@ const beginExportDataOperationSpec: msRest.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -892,6 +891,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -900,19 +902,22 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer }; -const listNextOperationSpec: msRest.OperationSpec = { +const listBySubscriptionNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com", path: "{nextLink}", urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -921,7 +926,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.RedisListResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/redis/arm-rediscache/src/redisManagementClient.ts b/sdk/redis/arm-rediscache/src/redisManagementClient.ts index cd3b8b9dfe2e..21f06558f5d5 100644 --- a/sdk/redis/arm-rediscache/src/redisManagementClient.ts +++ b/sdk/redis/arm-rediscache/src/redisManagementClient.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 @@ -22,6 +21,8 @@ class RedisManagementClient extends RedisManagementClientContext { firewallRules: operations.FirewallRules; patchSchedules: operations.PatchSchedules; linkedServer: operations.LinkedServer; + privateEndpointConnections: operations.PrivateEndpointConnections; + privateLinkResources: operations.PrivateLinkResources; /** * Initializes a new instance of the RedisManagementClient class. @@ -37,6 +38,8 @@ class RedisManagementClient extends RedisManagementClientContext { this.firewallRules = new operations.FirewallRules(this); this.patchSchedules = new operations.PatchSchedules(this); this.linkedServer = new operations.LinkedServer(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); } } diff --git a/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts b/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts index 286d06abeb1f..7258106886f9 100644 --- a/sdk/redis/arm-rediscache/src/redisManagementClientContext.ts +++ b/sdk/redis/arm-rediscache/src/redisManagementClientContext.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 @@ -45,7 +44,7 @@ export class RedisManagementClientContext extends msRestAzure.AzureServiceClient super(credentials, options); - this.apiVersion = '2019-07-01'; + this.apiVersion = '2020-06-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";