From 25bcc0ade29417977c8f7b921c0aa0d6d97474f7 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 24 Mar 2020 04:19:27 +0000 Subject: [PATCH] Generated from 2dd9dd4a37612f1d128349586e7d710419850e26 Add api-version 2020-02-02 of recoveryservicebackup for go SDK --- .../arm-recoveryservicesbackup/README.md | 10 +- .../src/models/backupEnginesMappers.ts | 4 + .../src/models/backupJobsMappers.ts | 4 + .../src/models/backupPoliciesMappers.ts | 4 + .../models/backupProtectableItemsMappers.ts | 4 + .../src/models/backupProtectedItemsMappers.ts | 4 + .../backupProtectionContainersMappers.ts | 4 + .../models/backupProtectionIntentMappers.ts | 4 + .../backupResourceStorageConfigsMappers.ts | 4 + .../backupResourceVaultConfigsMappers.ts | 6 + .../src/models/backupWorkloadItemsMappers.ts | 4 + .../src/models/backupsMappers.ts | 4 + .../src/models/index.ts | 425 ++++++++++++---- .../itemLevelRecoveryConnectionsMappers.ts | 4 + .../src/models/jobDetailsMappers.ts | 4 + .../src/models/mappers.ts | 479 ++++++++++++------ .../src/models/parameters.ts | 28 +- ...vateEndpointConnectionOperationsMappers.ts | 202 ++++++++ .../models/protectableContainersMappers.ts | 4 + .../protectedItemOperationResultsMappers.ts | 4 + .../src/models/protectedItemsMappers.ts | 4 + ...tectionContainerOperationResultsMappers.ts | 4 + .../src/models/protectionContainersMappers.ts | 4 + .../protectionIntentOperationsMappers.ts | 4 + .../src/models/protectionPoliciesMappers.ts | 4 + ...protectionPolicyOperationResultsMappers.ts | 4 + .../src/models/recoveryPointsMappers.ts | 4 + .../src/models/restoresMappers.ts | 4 + .../src/operations/backupEngines.ts | 4 +- .../src/operations/backupJobs.ts | 2 +- .../src/operations/backupOperationResults.ts | 2 +- .../src/operations/backupOperationStatuses.ts | 2 +- .../src/operations/backupPolicies.ts | 2 +- .../src/operations/backupProtectableItems.ts | 2 +- .../src/operations/backupProtectedItems.ts | 2 +- .../operations/backupProtectionContainers.ts | 2 +- .../src/operations/backupProtectionIntent.ts | 2 +- .../backupResourceStorageConfigs.ts | 6 +- .../operations/backupResourceVaultConfigs.ts | 75 ++- .../src/operations/backupStatus.ts | 2 +- .../src/operations/backupUsageSummaries.ts | 2 +- .../src/operations/backupWorkloadItems.ts | 2 +- .../src/operations/backups.ts | 2 +- .../operations/exportJobsOperationResults.ts | 2 +- .../src/operations/featureSupport.ts | 2 +- .../src/operations/index.ts | 1 + .../itemLevelRecoveryConnections.ts | 4 +- .../src/operations/jobCancellations.ts | 2 +- .../src/operations/jobDetails.ts | 2 +- .../src/operations/jobOperationResults.ts | 2 +- .../src/operations/jobs.ts | 2 +- .../src/operations/operation.ts | 2 +- .../src/operations/operations.ts | 2 +- .../privateEndpointConnectionOperations.ts | 231 +++++++++ .../src/operations/protectableContainers.ts | 2 +- .../protectedItemOperationResults.ts | 2 +- .../protectedItemOperationStatuses.ts | 2 +- .../src/operations/protectedItems.ts | 6 +- .../protectionContainerOperationResults.ts | 2 +- ...tectionContainerRefreshOperationResults.ts | 2 +- .../src/operations/protectionContainers.ts | 10 +- .../operations/protectionIntentOperations.ts | 8 +- .../src/operations/protectionPolicies.ts | 6 +- .../protectionPolicyOperationResults.ts | 2 +- .../protectionPolicyOperationStatuses.ts | 2 +- .../src/operations/recoveryPoints.ts | 4 +- .../src/operations/restores.ts | 2 +- .../src/operations/securityPINs.ts | 2 +- .../src/recoveryServicesBackupClient.ts | 73 +++ 69 files changed, 1407 insertions(+), 317 deletions(-) create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/privateEndpointConnectionOperationsMappers.ts create mode 100644 sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md index 8e653263f2c0..c9f0c165e927 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-recoveryservicesbackup ### How to use -#### nodejs - Authentication, client creation and get backupResourceVaultConfigs as an example written in TypeScript. +#### nodejs - Authentication, client creation and get privateEndpointConnection as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -37,7 +37,8 @@ msRestNodeAuth.interactiveLogin().then((creds) => { const client = new RecoveryServicesBackupClient(creds, subscriptionId); const vaultName = "testvaultName"; const resourceGroupName = "testresourceGroupName"; - client.backupResourceVaultConfigs.get(vaultName, resourceGroupName).then((result) => { + const privateEndpointConnectionName = "testprivateEndpointConnectionName"; + client.privateEndpointConnection.get(vaultName, resourceGroupName, privateEndpointConnectionName).then((result) => { console.log("The result is:"); console.log(result); }); @@ -46,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and get backupResourceVaultConfigs as an example written in JavaScript. +#### browser - Authentication, client creation and get privateEndpointConnection as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth @@ -82,7 +83,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to const client = new Azure.ArmRecoveryservicesbackup.RecoveryServicesBackupClient(res.creds, subscriptionId); const vaultName = "testvaultName"; const resourceGroupName = "testresourceGroupName"; - client.backupResourceVaultConfigs.get(vaultName, resourceGroupName).then((result) => { + const privateEndpointConnectionName = "testprivateEndpointConnectionName"; + client.privateEndpointConnection.get(vaultName, resourceGroupName, privateEndpointConnectionName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts index c2a2f39f7a19..a5ccbd335442 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupEnginesMappers.ts @@ -158,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectableContainerResourceList, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts index c2a2f39f7a19..a5ccbd335442 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupJobsMappers.ts @@ -158,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectableContainerResourceList, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts index c2a2f39f7a19..a5ccbd335442 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupPoliciesMappers.ts @@ -158,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectableContainerResourceList, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectableItemsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectableItemsMappers.ts index c2a2f39f7a19..a5ccbd335442 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectableItemsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectableItemsMappers.ts @@ -158,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectableContainerResourceList, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsMappers.ts index c2a2f39f7a19..a5ccbd335442 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectedItemsMappers.ts @@ -158,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectableContainerResourceList, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionContainersMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionContainersMappers.ts index c2a2f39f7a19..a5ccbd335442 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionContainersMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionContainersMappers.ts @@ -158,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectableContainerResourceList, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionIntentMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionIntentMappers.ts index c2a2f39f7a19..a5ccbd335442 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionIntentMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupProtectionIntentMappers.ts @@ -158,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectableContainerResourceList, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceStorageConfigsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceStorageConfigsMappers.ts index 59e1fea1005d..b5c797b381d0 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceStorageConfigsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceStorageConfigsMappers.ts @@ -156,6 +156,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectedItem, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceVaultConfigsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceVaultConfigsMappers.ts index 59e1fea1005d..2f77944c9cfd 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceVaultConfigsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupResourceVaultConfigsMappers.ts @@ -118,7 +118,9 @@ export { DPMProtectedItem, DPMProtectedItemExtendedInfo, EncryptionDetails, + ErrorAdditionalInfo, ErrorDetail, + ErrorResponse, ExtendedProperties, GenericContainer, GenericContainerExtendedInfo, @@ -156,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectedItem, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupWorkloadItemsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupWorkloadItemsMappers.ts index c2a2f39f7a19..a5ccbd335442 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupWorkloadItemsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupWorkloadItemsMappers.ts @@ -158,6 +158,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectableContainerResourceList, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupsMappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupsMappers.ts index 59e1fea1005d..b5c797b381d0 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupsMappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/backupsMappers.ts @@ -156,6 +156,10 @@ export { MonthlyRetentionSchedule, PointInTimeRange, PreBackupValidation, + PrivateEndpoint, + PrivateEndpointConnection, + PrivateEndpointConnectionResource, + PrivateLinkServiceConnectionState, ProtectableContainer, ProtectableContainerResource, ProtectedItem, diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts index 8f1997a41214..1cc0b51d90d7 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts @@ -11,6 +11,208 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * Error information associated with operation status call. + */ +export interface OperationStatusError { + /** + * Error code of the operation failure. + */ + code?: string; + /** + * Error message displayed if the operation failure. + */ + message?: string; +} + +/** + * Contains the possible cases for OperationStatusExtendedInfo. + */ +export type OperationStatusExtendedInfoUnion = OperationStatusExtendedInfo | OperationStatusJobExtendedInfo | OperationStatusJobsExtendedInfo | OperationStatusProvisionILRExtendedInfo; + +/** + * Base class for additional information of operation status. + */ +export interface OperationStatusExtendedInfo { + /** + * Polymorphic Discriminator + */ + objectType: "OperationStatusExtendedInfo"; +} + +/** + * Operation status. + */ +export interface OperationStatus { + /** + * ID of the operation. + */ + id?: string; + /** + * Name of the operation. + */ + name?: string; + /** + * Operation status. Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', + * 'Canceled' + */ + status?: OperationStatusValues; + /** + * Operation start time. Format: ISO-8601. + */ + startTime?: Date; + /** + * Operation end time. Format: ISO-8601. + */ + endTime?: Date; + /** + * Error information related to this operation. + */ + error?: OperationStatusError; + /** + * Additional information associated with this operation. + */ + properties?: OperationStatusExtendedInfoUnion; +} + +/** + * The Private Endpoint network resource that is linked to the Private Endpoint connection + */ +export interface PrivateEndpoint { + /** + * Gets or sets id + */ + id?: string; +} + +/** + * Private Link Service Connection State + */ +export interface PrivateLinkServiceConnectionState { + /** + * Gets or sets the status. Possible values include: 'Pending', 'Approved', 'Rejected', + * 'Disconnected' + */ + status?: PrivateEndpointConnectionStatus; + /** + * Gets or sets description + */ + description?: string; + /** + * Gets or sets actions required + */ + actionRequired?: string; +} + +/** + * Private Endpoint Connection Response Properties + */ +export interface PrivateEndpointConnection { + /** + * Gets or sets provisioning state of the private endpoint connection. Possible values include: + * 'Succeeded', 'Deleting', 'Failed', 'Pending' + */ + provisioningState?: ProvisioningState; + /** + * Gets or sets private endpoint associated with the private endpoint connection + */ + privateEndpoint?: PrivateEndpoint; + /** + * Gets or sets private link service connection state + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; +} + +/** + * ARM Resource. + */ +export interface Resource extends BaseResource { + /** + * Resource Id represents the complete path to the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name associated with the resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource location. + */ + location?: string; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; + /** + * Optional ETag. + */ + eTag?: string; +} + +/** + * Private Endpoint Connection Response Properties + */ +export interface PrivateEndpointConnectionResource extends Resource { + /** + * PrivateEndpointConnectionResource properties + */ + properties?: PrivateEndpointConnection; +} + +/** + * 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 resource management error response. + */ +export interface ErrorResponse { + /** + * 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?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + /** * Additional information about Azure File Share backup item. */ @@ -2521,39 +2723,6 @@ export interface BackupResourceVaultConfig { softDeleteFeatureState?: SoftDeleteFeatureState; } -/** - * ARM Resource. - */ -export interface Resource extends BaseResource { - /** - * Resource Id represents the complete path to the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly id?: string; - /** - * Resource name associated with the resource. - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly name?: string; - /** - * Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... - * **NOTE: This property will not be serialized. It can only be populated by the server.** - */ - readonly type?: string; - /** - * Resource location. - */ - location?: string; - /** - * Resource tags. - */ - tags?: { [propertyName: string]: string }; - /** - * Optional ETag. - */ - eTag?: string; -} - /** * Backup resource vault config details. */ @@ -7054,70 +7223,6 @@ export interface MabContainer { containerHealthState?: string; } -/** - * Error information associated with operation status call. - */ -export interface OperationStatusError { - /** - * Error code of the operation failure. - */ - code?: string; - /** - * Error message displayed if the operation failure. - */ - message?: string; -} - -/** - * Contains the possible cases for OperationStatusExtendedInfo. - */ -export type OperationStatusExtendedInfoUnion = OperationStatusExtendedInfo | OperationStatusJobExtendedInfo | OperationStatusJobsExtendedInfo | OperationStatusProvisionILRExtendedInfo; - -/** - * Base class for additional information of operation status. - */ -export interface OperationStatusExtendedInfo { - /** - * Polymorphic Discriminator - */ - objectType: "OperationStatusExtendedInfo"; -} - -/** - * Operation status. - */ -export interface OperationStatus { - /** - * ID of the operation. - */ - id?: string; - /** - * Name of the operation. - */ - name?: string; - /** - * Operation status. Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', - * 'Canceled' - */ - status?: OperationStatusValues; - /** - * Operation start time. Format: ISO-8601. - */ - startTime?: Date; - /** - * Operation end time. Format: ISO-8601. - */ - endTime?: Date; - /** - * Error information related to this operation. - */ - error?: OperationStatusError; - /** - * Additional information associated with this operation. - */ - properties?: OperationStatusExtendedInfoUnion; -} - /** * Operation status job extended info. */ @@ -7605,6 +7710,30 @@ export interface ClientDiscoveryResponse extends Array; } + + /** + * Updates vault security config. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters resource config request + * @param [options] The optional parameters + * @returns Promise + */ + put(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters resource config request + * @param callback The callback + */ + put(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param parameters resource config request + * @param options The optional parameters + * @param callback The callback + */ + put(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + put(vaultName: string, resourceGroupName: string, parameters: Models.BackupResourceVaultConfigResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + parameters, + options + }, + putOperationSpec, + callback) as Promise; + } } // Operation Specifications @@ -112,7 +151,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -137,7 +176,7 @@ const updateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -159,3 +198,35 @@ const updateOperationSpec: msRest.OperationSpec = { }, serializer }; + +const putOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.BackupResourceVaultConfigResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.BackupResourceVaultConfigResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupStatus.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupStatus.ts index 30b40180b7e1..e02fed8f3ff8 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupStatus.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupStatus.ts @@ -69,7 +69,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummaries.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummaries.ts index cf6e4fbd2821..861abc19f3bd 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummaries.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupUsageSummaries.ts @@ -73,7 +73,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2, + Parameters.apiVersion3, Parameters.filter, Parameters.skipToken ], diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupWorkloadItems.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupWorkloadItems.ts index e48f71fbe506..1bb4115b4164 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupWorkloadItems.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backupWorkloadItems.ts @@ -115,7 +115,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.containerName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter, Parameters.skipToken ], diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backups.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backups.ts index bfef7754a48d..57896dba992a 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backups.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/backups.ts @@ -94,7 +94,7 @@ const triggerOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/exportJobsOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/exportJobsOperationResults.ts index b66608ae2199..0e74cf5b1efe 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/exportJobsOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/exportJobsOperationResults.ts @@ -81,7 +81,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.operationId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/featureSupport.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/featureSupport.ts index d128811dcfbc..ef4c19f8ed09 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/featureSupport.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/featureSupport.ts @@ -69,7 +69,7 @@ const validateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts index cd417e75da36..cff469100f5c 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/index.ts @@ -8,6 +8,7 @@ * regenerated. */ +export * from "./privateEndpointConnectionOperations"; export * from "./backupResourceVaultConfigs"; export * from "./protectedItems"; export * from "./protectedItemOperationResults"; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/itemLevelRecoveryConnections.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/itemLevelRecoveryConnections.ts index e3c8da2fd0a6..63983e7812a3 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/itemLevelRecoveryConnections.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/itemLevelRecoveryConnections.ts @@ -166,7 +166,7 @@ const provisionOperationSpec: msRest.OperationSpec = { Parameters.recoveryPointId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -200,7 +200,7 @@ const revokeOperationSpec: msRest.OperationSpec = { Parameters.recoveryPointId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobCancellations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobCancellations.ts index 5993929c7a09..442f5f77e51f 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobCancellations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobCancellations.ts @@ -78,7 +78,7 @@ const triggerOperationSpec: msRest.OperationSpec = { Parameters.jobName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobDetails.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobDetails.ts index a454cc6a422e..bf7a50af9b7f 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobDetails.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobDetails.ts @@ -78,7 +78,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.jobName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobOperationResults.ts index 202269de4dd3..e09087842b60 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobOperationResults.ts @@ -82,7 +82,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.operationId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobs.ts index 3ba51f860796..ccb2e58ba542 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobs.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/jobs.ts @@ -73,7 +73,7 @@ const exportMethodOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0, + Parameters.apiVersion1, Parameters.filter ], headerParameters: [ diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operation.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operation.ts index b889f7551166..80ce96334588 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operation.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operation.ts @@ -77,7 +77,7 @@ const validateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operations.ts index 3e6350b8a132..6fd0022c8fc0 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/operations.ts @@ -85,7 +85,7 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "providers/Microsoft.RecoveryServices/operations", queryParameters: [ - Parameters.apiVersion3 + Parameters.apiVersion4 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts new file mode 100644 index 000000000000..fdb4a5c9916a --- /dev/null +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts @@ -0,0 +1,231 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * 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/privateEndpointConnectionOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { RecoveryServicesBackupClientContext } from "../recoveryServicesBackupClientContext"; + +/** Class representing a PrivateEndpointConnectionOperations. */ +export class PrivateEndpointConnectionOperations { + private readonly client: RecoveryServicesBackupClientContext; + + /** + * Create a PrivateEndpointConnectionOperations. + * @param {RecoveryServicesBackupClientContext} client Reference to the service client. + */ + constructor(client: RecoveryServicesBackupClientContext) { + this.client = client; + } + + /** + * Get Private Endpoint Connection. This call is made by Backup Admin. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + vaultName, + resourceGroupName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + put(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnectionResource, options?: msRest.RequestOptionsBase): Promise { + return this.beginPut(vaultName,resourceGroupName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Delete Private Endpoint requests. This call is made by Backup Admin. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(vaultName,resourceGroupName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Approve or Reject Private Endpoint requests. This call is made by Backup Admin. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters Request body for operation + * @param [options] The optional parameters + * @returns Promise + */ + beginPut(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnectionResource, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + privateEndpointConnectionName, + parameters, + options + }, + beginPutOperationSpec, + options); + } + + /** + * Delete Private Endpoint requests. This call is made by Backup Admin. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + vaultName, + resourceGroupName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionResource + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const beginPutOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnectionResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionResource + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnectionResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectableContainers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectableContainers.ts index 55b6cc6fbbc9..92999e8d95de 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectableContainers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectableContainers.ts @@ -106,7 +106,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.fabricName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter ], headerParameters: [ diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationResults.ts index 8b9709717007..480fd2b20e17 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationResults.ts @@ -93,7 +93,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.operationId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationStatuses.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationStatuses.ts index 0bf71c196187..62e38f8252fd 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationStatuses.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItemOperationStatuses.ts @@ -97,7 +97,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.operationId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItems.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItems.ts index cccf7a7e1864..7b0982b4c2e7 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItems.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectedItems.ts @@ -193,7 +193,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName ], queryParameters: [ - Parameters.apiVersion0, + Parameters.apiVersion1, Parameters.filter ], headerParameters: [ @@ -222,7 +222,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -258,7 +258,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerOperationResults.ts index 34e65998a261..fbfa32adf288 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerOperationResults.ts @@ -88,7 +88,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.operationId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerRefreshOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerRefreshOperationResults.ts index 70dfaddf31c3..e0d2487aeafb 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerRefreshOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainerRefreshOperationResults.ts @@ -82,7 +82,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.operationId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainers.ts index 7bac5f13ebc6..bb1d21630ce3 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionContainers.ts @@ -268,7 +268,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.containerName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -295,7 +295,7 @@ const registerOperationSpec: msRest.OperationSpec = { Parameters.containerName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -330,7 +330,7 @@ const unregisterOperationSpec: msRest.OperationSpec = { Parameters.containerName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage @@ -356,7 +356,7 @@ const inquireOperationSpec: msRest.OperationSpec = { Parameters.containerName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter ], headerParameters: [ @@ -381,7 +381,7 @@ const refreshOperationSpec: msRest.OperationSpec = { Parameters.fabricName ], queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion2, Parameters.filter ], headerParameters: [ diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionIntentOperations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionIntentOperations.ts index b91d7ead0457..be8a96066335 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionIntentOperations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionIntentOperations.ts @@ -207,7 +207,7 @@ const validateOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -241,7 +241,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.intentObjectName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -268,7 +268,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.intentObjectName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage @@ -302,7 +302,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.intentObjectName ], queryParameters: [ - Parameters.apiVersion2 + Parameters.apiVersion3 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts index eef7f3df3474..a43a693d283a 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts @@ -166,7 +166,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.policyName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -192,7 +192,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { Parameters.policyName ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -226,7 +226,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.policyName ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationResults.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationResults.ts index 4cfefdcf6716..85339f8da461 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationResults.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationResults.ts @@ -83,7 +83,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.operationId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationStatuses.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationStatuses.ts index 3a38f14e2e8b..8b487a76d326 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationStatuses.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicyOperationStatuses.ts @@ -87,7 +87,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.operationId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPoints.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPoints.ts index 92316516317f..afd2493318d6 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPoints.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/recoveryPoints.ts @@ -169,7 +169,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.protectedItemName ], queryParameters: [ - Parameters.apiVersion0, + Parameters.apiVersion1, Parameters.filter ], headerParameters: [ @@ -199,7 +199,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.recoveryPointId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts index b1c549ff769d..4803b35f92f5 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts @@ -99,7 +99,7 @@ const triggerOperationSpec: msRest.OperationSpec = { Parameters.recoveryPointId ], queryParameters: [ - Parameters.apiVersion0 + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/securityPINs.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/securityPINs.ts index 9305ad9a7cef..3a4768974be5 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/securityPINs.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/securityPINs.ts @@ -73,7 +73,7 @@ const getOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion1 + Parameters.apiVersion2 ], headerParameters: [ Parameters.acceptLanguage diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts index 8460aa26170b..af400f29edcc 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts @@ -11,12 +11,14 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { RecoveryServicesBackupClientContext } from "./recoveryServicesBackupClientContext"; class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { // Operation groups + privateEndpointConnection: operations.PrivateEndpointConnectionOperations; backupResourceVaultConfigs: operations.BackupResourceVaultConfigs; protectedItems: operations.ProtectedItems; protectedItemOperationResults: operations.ProtectedItemOperationResults; @@ -64,6 +66,7 @@ class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.RecoveryServicesBackupClientOptions) { super(credentials, subscriptionId, options); + this.privateEndpointConnection = new operations.PrivateEndpointConnectionOperations(this); this.backupResourceVaultConfigs = new operations.BackupResourceVaultConfigs(this); this.protectedItems = new operations.ProtectedItems(this); this.protectedItemOperationResults = new operations.ProtectedItemOperationResults(this); @@ -103,9 +106,79 @@ class RecoveryServicesBackupClient extends RecoveryServicesBackupClientContext { this.backupResourceStorageConfigs = new operations.BackupResourceStorageConfigs(this); this.operations = new operations.Operations(this); } + + /** + * @summary Gets the operation status for a private endpoint connection. + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param operationId Operation id + * @param [options] The optional parameters + * @returns Promise + */ + getOperationStatus(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param operationId Operation id + * @param callback The callback + */ + getOperationStatus(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param vaultName The name of the recovery services vault. + * @param resourceGroupName The name of the resource group where the recovery services vault is + * present. + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param operationId Operation id + * @param options The optional parameters + * @param callback The callback + */ + getOperationStatus(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getOperationStatus(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + vaultName, + resourceGroupName, + privateEndpointConnectionName, + operationId, + options + }, + getOperationStatusOperationSpec, + callback) as Promise; + } } // Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationStatusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}/operationsStatus/{operationId}", + urlParameters: [ + Parameters.vaultName, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.privateEndpointConnectionName, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; export { RecoveryServicesBackupClient,