From 500672658a6a5b4b4107bdb1ec438bfbbd2c5d71 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 23 Nov 2022 05:30:21 +0000 Subject: [PATCH] CodeGen from PR 21448 in Azure/azure-rest-api-specs Merge cb2f819d045ee7d2fc67abe3de764e483280263b into 7a54c1a83d14da431c0ae48c4315cba143084bce --- .../arm-recoveryservices/CHANGELOG.md | 27 +++ .../arm-recoveryservices/_meta.json | 8 +- .../arm-recoveryservices/package.json | 14 +- .../review/arm-recoveryservices.api.md | 88 +++++++++ .../arm-recoveryservices/src/models/index.ts | 124 ++++++++++++ .../src/models/mappers.ts | 183 ++++++++++++++++++ .../src/models/parameters.ts | 15 +- .../privateLinkResourcesOperations.ts | 12 +- .../src/operations/recoveryServices.ts | 48 ++++- .../src/operations/registeredIdentities.ts | 3 +- .../src/operations/replicationUsages.ts | 6 +- .../src/operations/usages.ts | 6 +- .../src/operations/vaultCertificates.ts | 3 +- .../src/operations/vaultExtendedInfo.ts | 9 +- .../src/operations/vaults.ts | 27 +-- .../privateLinkResourcesOperations.ts | 6 +- .../operationsInterfaces/recoveryServices.ts | 19 +- .../registeredIdentities.ts | 3 +- .../operationsInterfaces/replicationUsages.ts | 3 +- .../src/operationsInterfaces/usages.ts | 3 +- .../operationsInterfaces/vaultCertificates.ts | 3 +- .../operationsInterfaces/vaultExtendedInfo.ts | 9 +- .../src/operationsInterfaces/vaults.ts | 21 +- .../src/recoveryServicesClient.ts | 12 +- .../arm-recoveryservices/test/sampleTest.ts | 43 ++++ .../arm-recoveryservices/tsconfig.json | 10 +- 26 files changed, 592 insertions(+), 113 deletions(-) create mode 100644 sdk/recoveryservices/arm-recoveryservices/test/sampleTest.ts diff --git a/sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md b/sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md index 8df9b9de0d3c..7381a74f0788 100644 --- a/sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md +++ b/sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 5.2.0 (2022-11-23) + +**Features** + + - Added operation RecoveryServices.capabilities + - Added Interface CapabilitiesProperties + - Added Interface CapabilitiesResponse + - Added Interface CapabilitiesResponseProperties + - Added Interface DNSZone + - Added Interface DNSZoneResponse + - Added Interface ImmutabilitySettings + - Added Interface RecoveryServicesCapabilitiesOptionalParams + - Added Interface ResourceCapabilities + - Added Interface ResourceCapabilitiesBase + - Added Interface SecuritySettings + - Added Type Alias ImmutabilityState + - Added Type Alias PublicNetworkAccess + - Added Type Alias RecoveryServicesCapabilitiesResponse + - Added Type Alias VaultSubResourceType + - Interface PrivateEndpointConnection has a new optional parameter groupIds + - Interface VaultProperties has a new optional parameter publicNetworkAccess + - Interface VaultProperties has a new optional parameter securitySettings + - Added Enum KnownImmutabilityState + - Added Enum KnownPublicNetworkAccess + - Added Enum KnownVaultSubResourceType + + ## 5.1.0 (2022-07-22) **Features** diff --git a/sdk/recoveryservices/arm-recoveryservices/_meta.json b/sdk/recoveryservices/arm-recoveryservices/_meta.json index ff30ff40780a..fbe6ce69811b 100644 --- a/sdk/recoveryservices/arm-recoveryservices/_meta.json +++ b/sdk/recoveryservices/arm-recoveryservices/_meta.json @@ -1,8 +1,8 @@ { - "commit": "405811c51aa09803caedfe17fd305e110db1ca5e", + "commit": "aab996e2654f8cd522b441f83c5a24421f0c5569", "readme": "specification/recoveryservices/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservices\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220720.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/recoveryservices/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1.20220720.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/recoveryservices/arm-recoveryservices/package.json b/sdk/recoveryservices/arm-recoveryservices/package.json index 8634efa1e13d..47618724403b 100644 --- a/sdk/recoveryservices/arm-recoveryservices/package.json +++ b/sdk/recoveryservices/arm-recoveryservices/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for RecoveryServicesClient.", - "version": "5.1.0", + "version": "5.2.0", "engines": { "node": ">=14.0.0" }, @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservices?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/recoveryservices/arm-recoveryservices/review/arm-recoveryservices.api.md b/sdk/recoveryservices/arm-recoveryservices/review/arm-recoveryservices.api.md index 12bf5a2f2c0c..67b3196cfd1a 100644 --- a/sdk/recoveryservices/arm-recoveryservices/review/arm-recoveryservices.api.md +++ b/sdk/recoveryservices/arm-recoveryservices/review/arm-recoveryservices.api.md @@ -25,6 +25,23 @@ export interface AzureMonitorAlertSettings { // @public export type BackupStorageVersion = string; +// @public +export interface CapabilitiesProperties { + // (undocumented) + dnsZones?: DNSZone[]; +} + +// @public +export interface CapabilitiesResponse extends ResourceCapabilitiesBase { + properties?: CapabilitiesResponseProperties; +} + +// @public +export interface CapabilitiesResponseProperties { + // (undocumented) + dnsZones?: DNSZoneResponse[]; +} + // @public export interface CertificateRequest { properties?: RawCertificateData; @@ -113,6 +130,16 @@ export type CreatedByType = string; // @public export type CrossRegionRestore = string; +// @public +export interface DNSZone { + subResource?: VaultSubResourceType; +} + +// @public +export interface DNSZoneResponse extends DNSZone { + requiredZoneNames?: string[]; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -152,6 +179,15 @@ export interface IdentityData { }; } +// @public +export interface ImmutabilitySettings { + // (undocumented) + state?: ImmutabilityState; +} + +// @public +export type ImmutabilityState = string; + // @public export type InfrastructureEncryptionState = string; @@ -198,6 +234,13 @@ export enum KnownCrossRegionRestore { Enabled = "Enabled" } +// @public +export enum KnownImmutabilityState { + Disabled = "Disabled", + Locked = "Locked", + Unlocked = "Unlocked" +} + // @public export enum KnownInfrastructureEncryptionState { Disabled = "Disabled", @@ -220,6 +263,12 @@ export enum KnownProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownPublicNetworkAccess { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownResourceIdentityType { None = "None", @@ -277,6 +326,13 @@ export enum KnownVaultPrivateEndpointState { None = "None" } +// @public +export enum KnownVaultSubResourceType { + AzureBackup = "AzureBackup", + AzureBackupSecondary = "AzureBackup_secondary", + AzureSiteRecovery = "AzureSiteRecovery" +} + // @public export enum KnownVaultUpgradeState { Failed = "Failed", @@ -358,6 +414,7 @@ export interface PrivateEndpoint { // @public export interface PrivateEndpointConnection { + groupIds?: VaultSubResourceType[]; readonly privateEndpoint?: PrivateEndpoint; readonly privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; readonly provisioningState?: ProvisioningState; @@ -428,6 +485,9 @@ export interface PrivateLinkServiceConnectionState { // @public export type ProvisioningState = string; +// @public +export type PublicNetworkAccess = string; + // @public export interface RawCertificateData { authType?: AuthType; @@ -436,9 +496,17 @@ export interface RawCertificateData { // @public export interface RecoveryServices { + capabilities(location: string, input: ResourceCapabilities, options?: RecoveryServicesCapabilitiesOptionalParams): Promise; checkNameAvailability(resourceGroupName: string, location: string, input: CheckNameAvailabilityParameters, options?: RecoveryServicesCheckNameAvailabilityOptionalParams): Promise; } +// @public +export interface RecoveryServicesCapabilitiesOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RecoveryServicesCapabilitiesResponse = CapabilitiesResponse; + // @public export interface RecoveryServicesCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions { } @@ -528,6 +596,16 @@ export interface Resource { readonly type?: string; } +// @public +export interface ResourceCapabilities extends ResourceCapabilitiesBase { + properties?: CapabilitiesProperties; +} + +// @public +export interface ResourceCapabilitiesBase { + type: string; +} + // @public export interface ResourceCertificateAndAadDetails extends ResourceCertificateDetails { aadAudience?: string; @@ -570,6 +648,11 @@ export type ResourceIdentityType = string; // @public export type ResourceMoveState = string; +// @public +export interface SecuritySettings { + immutabilitySettings?: ImmutabilitySettings; +} + // @public export interface Sku { capacity?: string; @@ -725,7 +808,9 @@ export interface VaultProperties { readonly privateEndpointStateForBackup?: VaultPrivateEndpointState; readonly privateEndpointStateForSiteRecovery?: VaultPrivateEndpointState; readonly provisioningState?: string; + publicNetworkAccess?: PublicNetworkAccess; redundancySettings?: VaultPropertiesRedundancySettings; + securitySettings?: SecuritySettings; upgradeDetails?: UpgradeDetails; } @@ -811,6 +896,9 @@ export interface VaultsListBySubscriptionIdOptionalParams extends coreClient.Ope // @public export type VaultsListBySubscriptionIdResponse = VaultList; +// @public +export type VaultSubResourceType = string; + // @public export interface VaultsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts index aa94abb60040..30915299bb5d 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts @@ -224,6 +224,28 @@ export interface CheckNameAvailabilityResult { message?: string; } +/** Capabilities information */ +export interface CapabilitiesProperties { + dnsZones?: DNSZone[]; +} + +/** DNSZone information */ +export interface DNSZone { + /** Subresource type for vault AzureBackup, AzureBackup_secondary or AzureSiteRecovery */ + subResource?: VaultSubResourceType; +} + +/** Base class for request and response capabilities information for Microsoft.RecoveryServices */ +export interface ResourceCapabilitiesBase { + /** Describes the Resource type: Microsoft.RecoveryServices/Vaults */ + type: string; +} + +/** Capabilities properties in response */ +export interface CapabilitiesResponseProperties { + dnsZones?: DNSZoneResponse[]; +} + /** The response model for a list of Vaults. */ export interface VaultList { value?: Vault[]; @@ -301,10 +323,14 @@ export interface VaultProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly backupStorageVersion?: BackupStorageVersion; + /** property to enable or disable resource provider inbound network traffic from public clients */ + publicNetworkAccess?: PublicNetworkAccess; /** Monitoring Settings of the vault */ monitoringSettings?: MonitoringSettings; /** The redundancy Settings of a Vault */ redundancySettings?: VaultPropertiesRedundancySettings; + /** Security Settings of the vault */ + securitySettings?: SecuritySettings; } /** Details for upgrading vault. */ @@ -402,6 +428,8 @@ export interface PrivateEndpointConnection { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** Group Ids for the Private Endpoint */ + groupIds?: VaultSubResourceType[]; } /** The Private Endpoint network resource that is linked to the Private Endpoint connection. */ @@ -517,6 +545,17 @@ export interface VaultPropertiesRedundancySettings { readonly crossRegionRestore?: CrossRegionRestore; } +/** Security Settings of the vault */ +export interface SecuritySettings { + /** Immutability Settings of a vault */ + immutabilitySettings?: ImmutabilitySettings; +} + +/** Immutability Settings of vault */ +export interface ImmutabilitySettings { + state?: ImmutabilityState; +} + /** Identifies the unique system identifier for each Azure resource. */ export interface Sku { /** Name of SKU is RS0 (Recovery Services 0th version) and the tier is standard tier. They do not have affect on backend storage redundancy or any other vault settings. To manage storage redundancy, use the backupstorageconfig */ @@ -702,6 +741,24 @@ export interface ResourceCertificateAndAcsDetails globalAcsRPRealm: string; } +/** DNSZone information for Microsoft.RecoveryServices */ +export interface DNSZoneResponse extends DNSZone { + /** The private link resource Private link DNS zone names. */ + requiredZoneNames?: string[]; +} + +/** Input to get capabilities information for Microsoft.RecoveryServices */ +export interface ResourceCapabilities extends ResourceCapabilitiesBase { + /** Capabilities information */ + properties?: CapabilitiesProperties; +} + +/** Capabilities response for Microsoft.RecoveryServices */ +export interface CapabilitiesResponse extends ResourceCapabilitiesBase { + /** Capabilities properties in response */ + properties?: CapabilitiesResponseProperties; +} + /** Tracked resource with location. */ export interface TrackedResource extends Resource { /** Resource location. */ @@ -782,6 +839,27 @@ export enum KnownAuthType { */ export type AuthType = string; +/** Known values of {@link VaultSubResourceType} that the service accepts. */ +export enum KnownVaultSubResourceType { + /** AzureBackup */ + AzureBackup = "AzureBackup", + /** AzureBackupSecondary */ + AzureBackupSecondary = "AzureBackup_secondary", + /** AzureSiteRecovery */ + AzureSiteRecovery = "AzureSiteRecovery" +} + +/** + * Defines values for VaultSubResourceType. \ + * {@link KnownVaultSubResourceType} can be used interchangeably with VaultSubResourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureBackup** \ + * **AzureBackup_secondary** \ + * **AzureSiteRecovery** + */ +export type VaultSubResourceType = string; + /** Known values of {@link ResourceIdentityType} that the service accepts. */ export enum KnownResourceIdentityType { /** SystemAssigned */ @@ -995,6 +1073,24 @@ export enum KnownBackupStorageVersion { */ export type BackupStorageVersion = string; +/** Known values of {@link PublicNetworkAccess} that the service accepts. */ +export enum KnownPublicNetworkAccess { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for PublicNetworkAccess. \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type PublicNetworkAccess = string; + /** Known values of {@link AlertsState} that the service accepts. */ export enum KnownAlertsState { /** Enabled */ @@ -1052,6 +1148,27 @@ export enum KnownCrossRegionRestore { */ export type CrossRegionRestore = string; +/** Known values of {@link ImmutabilityState} that the service accepts. */ +export enum KnownImmutabilityState { + /** Disabled */ + Disabled = "Disabled", + /** Unlocked */ + Unlocked = "Unlocked", + /** Locked */ + Locked = "Locked" +} + +/** + * Defines values for ImmutabilityState. \ + * {@link KnownImmutabilityState} can be used interchangeably with ImmutabilityState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Unlocked** \ + * **Locked** + */ +export type ImmutabilityState = string; + /** Known values of {@link SkuName} that the service accepts. */ export enum KnownSkuName { /** Standard */ @@ -1170,6 +1287,13 @@ export interface RecoveryServicesCheckNameAvailabilityOptionalParams /** Contains response data for the checkNameAvailability operation. */ export type RecoveryServicesCheckNameAvailabilityResponse = CheckNameAvailabilityResult; +/** Optional parameters. */ +export interface RecoveryServicesCapabilitiesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the capabilities operation. */ +export type RecoveryServicesCapabilitiesResponse = CapabilitiesResponse; + /** Optional parameters. */ export interface VaultsListBySubscriptionIdOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts index ac2c711e56f4..6a69244aca50 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts @@ -523,6 +523,79 @@ export const CheckNameAvailabilityResult: coreClient.CompositeMapper = { } }; +export const CapabilitiesProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CapabilitiesProperties", + modelProperties: { + dnsZones: { + serializedName: "dnsZones", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DNSZone" + } + } + } + } + } + } +}; + +export const DNSZone: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DNSZone", + modelProperties: { + subResource: { + serializedName: "subResource", + type: { + name: "String" + } + } + } + } +}; + +export const ResourceCapabilitiesBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceCapabilitiesBase", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const CapabilitiesResponseProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CapabilitiesResponseProperties", + modelProperties: { + dnsZones: { + serializedName: "dnsZones", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DNSZoneResponse" + } + } + } + } + } + } +}; + export const VaultList: coreClient.CompositeMapper = { type: { name: "Composite", @@ -685,6 +758,12 @@ export const VaultProperties: coreClient.CompositeMapper = { name: "String" } }, + publicNetworkAccess: { + serializedName: "publicNetworkAccess", + type: { + name: "String" + } + }, monitoringSettings: { serializedName: "monitoringSettings", type: { @@ -698,6 +777,13 @@ export const VaultProperties: coreClient.CompositeMapper = { name: "Composite", className: "VaultPropertiesRedundancySettings" } + }, + securitySettings: { + serializedName: "securitySettings", + type: { + name: "Composite", + className: "SecuritySettings" + } } } } @@ -844,6 +930,17 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { name: "Composite", className: "PrivateLinkServiceConnectionState" } + }, + groupIds: { + serializedName: "groupIds", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1080,6 +1177,37 @@ export const VaultPropertiesRedundancySettings: coreClient.CompositeMapper = { } }; +export const SecuritySettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecuritySettings", + modelProperties: { + immutabilitySettings: { + serializedName: "immutabilitySettings", + type: { + name: "Composite", + className: "ImmutabilitySettings" + } + } + } + } +}; + +export const ImmutabilitySettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImmutabilitySettings", + modelProperties: { + state: { + serializedName: "state", + type: { + name: "String" + } + } + } + } +}; + export const Sku: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1590,6 +1718,61 @@ export const ResourceCertificateAndAcsDetails: coreClient.CompositeMapper = { } }; +export const DNSZoneResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DNSZoneResponse", + modelProperties: { + ...DNSZone.type.modelProperties, + requiredZoneNames: { + serializedName: "requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ResourceCapabilities: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceCapabilities", + modelProperties: { + ...ResourceCapabilitiesBase.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CapabilitiesProperties" + } + } + } + } +}; + +export const CapabilitiesResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CapabilitiesResponse", + modelProperties: { + ...ResourceCapabilitiesBase.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CapabilitiesResponseProperties" + } + } + } + } +}; + export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts index 3295d24ccce6..2536b726b58f 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts @@ -14,6 +14,7 @@ import { import { CertificateRequest as CertificateRequestMapper, CheckNameAvailabilityParameters as CheckNameAvailabilityParametersMapper, + ResourceCapabilities as ResourceCapabilitiesMapper, Vault as VaultMapper, PatchVault as PatchVaultMapper, VaultExtendedInfoResource as VaultExtendedInfoResourceMapper @@ -63,6 +64,9 @@ export const $host: OperationURLParameter = { export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { + constraints: { + MinLength: 1 + }, serializedName: "subscriptionId", required: true, type: { @@ -74,7 +78,7 @@ export const subscriptionId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-04-01", + defaultValue: "2022-10-01", isConstant: true, serializedName: "api-version", type: { @@ -86,6 +90,10 @@ export const apiVersion: OperationQueryParameter = { export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { + constraints: { + MaxLength: 90, + MinLength: 1 + }, serializedName: "resourceGroupName", required: true, type: { @@ -166,6 +174,11 @@ export const location: OperationURLParameter = { } }; +export const input1: OperationParameter = { + parameterPath: "input", + mapper: ResourceCapabilitiesMapper +}; + export const vault: OperationParameter = { parameterPath: "vault", mapper: VaultMapper diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/privateLinkResourcesOperations.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/privateLinkResourcesOperations.ts index bb9113c89ca9..4b19c07db2d5 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/privateLinkResourcesOperations.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/privateLinkResourcesOperations.ts @@ -38,8 +38,7 @@ export class PrivateLinkResourcesOperationsImpl /** * Returns the list of private link resources that need to be created for Backup and SiteRecovery - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -98,8 +97,7 @@ export class PrivateLinkResourcesOperationsImpl /** * Returns the list of private link resources that need to be created for Backup and SiteRecovery - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -116,8 +114,7 @@ export class PrivateLinkResourcesOperationsImpl /** * Returns a specified private link resource that need to be created for Backup and SiteRecovery - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param privateLinkResourceName * @param options The options parameters. @@ -136,8 +133,7 @@ export class PrivateLinkResourcesOperationsImpl /** * ListNext - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/recoveryServices.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/recoveryServices.ts index 0a535ff4c96c..eb541116d201 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/recoveryServices.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/recoveryServices.ts @@ -14,7 +14,10 @@ import { RecoveryServicesClient } from "../recoveryServicesClient"; import { CheckNameAvailabilityParameters, RecoveryServicesCheckNameAvailabilityOptionalParams, - RecoveryServicesCheckNameAvailabilityResponse + RecoveryServicesCheckNameAvailabilityResponse, + ResourceCapabilities, + RecoveryServicesCapabilitiesOptionalParams, + RecoveryServicesCapabilitiesResponse } from "../models"; /** Class containing RecoveryServices operations. */ @@ -35,8 +38,7 @@ export class RecoveryServicesImpl implements RecoveryServices { * Type * or if one or more such resources exist, each of these must be GC'd and their time of deletion be * more than 24 Hours Ago - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location Location of the resource * @param input Contains information about Resource type and Resource name * @param options The options parameters. @@ -52,6 +54,23 @@ export class RecoveryServicesImpl implements RecoveryServices { checkNameAvailabilityOperationSpec ); } + + /** + * API to get details about capabilities provided by Microsoft.RecoveryServices RP + * @param location Location of the resource + * @param input Contains information about Resource type and properties to get capabilities + * @param options The options parameters. + */ + capabilities( + location: string, + input: ResourceCapabilities, + options?: RecoveryServicesCapabilitiesOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, input, options }, + capabilitiesOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -80,3 +99,26 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const capabilitiesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{location}/capabilities", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CapabilitiesResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.input1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer +}; diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/registeredIdentities.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/registeredIdentities.ts index af336b13041f..7817c46fcacb 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/registeredIdentities.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/registeredIdentities.ts @@ -27,8 +27,7 @@ export class RegisteredIdentitiesImpl implements RegisteredIdentities { /** * Unregisters the given container from your Recovery Services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param identityName Name of the protection container to unregister. * @param options The options parameters. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/replicationUsages.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/replicationUsages.ts index c7e1f5876769..e453aafae9a1 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/replicationUsages.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/replicationUsages.ts @@ -33,8 +33,7 @@ export class ReplicationUsagesImpl implements ReplicationUsages { /** * Fetches the replication usages of the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -82,8 +81,7 @@ export class ReplicationUsagesImpl implements ReplicationUsages { /** * Fetches the replication usages of the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/usages.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/usages.ts index 0716b36ef219..e492ad1c2572 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/usages.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/usages.ts @@ -33,8 +33,7 @@ export class UsagesImpl implements Usages { /** * Fetches the usages of the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -94,8 +93,7 @@ export class UsagesImpl implements Usages { /** * Fetches the usages of the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/vaultCertificates.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/vaultCertificates.ts index 49fde9c675ec..d3d6477371ee 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/vaultCertificates.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/vaultCertificates.ts @@ -31,8 +31,7 @@ export class VaultCertificatesImpl implements VaultCertificates { /** * Uploads a certificate for a resource. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param certificateName Certificate friendly name. * @param certificateRequest Input parameters for uploading the vault certificate. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/vaultExtendedInfo.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/vaultExtendedInfo.ts index 453543e2da6d..f74ba906d386 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/vaultExtendedInfo.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/vaultExtendedInfo.ts @@ -35,8 +35,7 @@ export class VaultExtendedInfoImpl implements VaultExtendedInfo { /** * Get the vault extended info. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -53,8 +52,7 @@ export class VaultExtendedInfoImpl implements VaultExtendedInfo { /** * Create vault extended info. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param resourceExtendedInfoDetails Details of ResourceExtendedInfo * @param options The options parameters. @@ -73,8 +71,7 @@ export class VaultExtendedInfoImpl implements VaultExtendedInfo { /** * Update vault extended info. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param resourceExtendedInfoDetails Details of ResourceExtendedInfo * @param options The options parameters. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operations/vaults.ts b/sdk/recoveryservices/arm-recoveryservices/src/operations/vaults.ts index 139497e885f2..806134001918 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operations/vaults.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operations/vaults.ts @@ -91,8 +91,7 @@ export class VaultsImpl implements Vaults { /** * Retrieve a list of Vaults. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -158,8 +157,7 @@ export class VaultsImpl implements Vaults { /** * Retrieve a list of Vaults. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -174,8 +172,7 @@ export class VaultsImpl implements Vaults { /** * Get the Vault details. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -192,8 +189,7 @@ export class VaultsImpl implements Vaults { /** * Creates or updates a Recovery Services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param vault Recovery Services Vault to be created. * @param options The options parameters. @@ -263,8 +259,7 @@ export class VaultsImpl implements Vaults { /** * Creates or updates a Recovery Services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param vault Recovery Services Vault to be created. * @param options The options parameters. @@ -286,8 +281,7 @@ export class VaultsImpl implements Vaults { /** * Deletes a vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -304,8 +298,7 @@ export class VaultsImpl implements Vaults { /** * Updates the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param vault Recovery Services Vault to be created. * @param options The options parameters. @@ -372,8 +365,7 @@ export class VaultsImpl implements Vaults { /** * Updates the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param vault Recovery Services Vault to be created. * @param options The options parameters. @@ -410,8 +402,7 @@ export class VaultsImpl implements Vaults { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. * @param options The options parameters. */ diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/privateLinkResourcesOperations.ts b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/privateLinkResourcesOperations.ts index 111912086226..cba042fa6a9d 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/privateLinkResourcesOperations.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/privateLinkResourcesOperations.ts @@ -19,8 +19,7 @@ import { export interface PrivateLinkResourcesOperations { /** * Returns the list of private link resources that need to be created for Backup and SiteRecovery - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -31,8 +30,7 @@ export interface PrivateLinkResourcesOperations { ): PagedAsyncIterableIterator; /** * Returns a specified private link resource that need to be created for Backup and SiteRecovery - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param privateLinkResourceName * @param options The options parameters. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/recoveryServices.ts b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/recoveryServices.ts index 8fbfb8839818..cbe6516f20a5 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/recoveryServices.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/recoveryServices.ts @@ -9,7 +9,10 @@ import { CheckNameAvailabilityParameters, RecoveryServicesCheckNameAvailabilityOptionalParams, - RecoveryServicesCheckNameAvailabilityResponse + RecoveryServicesCheckNameAvailabilityResponse, + ResourceCapabilities, + RecoveryServicesCapabilitiesOptionalParams, + RecoveryServicesCapabilitiesResponse } from "../models"; /** Interface representing a RecoveryServices. */ @@ -20,8 +23,7 @@ export interface RecoveryServices { * Type * or if one or more such resources exist, each of these must be GC'd and their time of deletion be * more than 24 Hours Ago - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param location Location of the resource * @param input Contains information about Resource type and Resource name * @param options The options parameters. @@ -32,4 +34,15 @@ export interface RecoveryServices { input: CheckNameAvailabilityParameters, options?: RecoveryServicesCheckNameAvailabilityOptionalParams ): Promise; + /** + * API to get details about capabilities provided by Microsoft.RecoveryServices RP + * @param location Location of the resource + * @param input Contains information about Resource type and properties to get capabilities + * @param options The options parameters. + */ + capabilities( + location: string, + input: ResourceCapabilities, + options?: RecoveryServicesCapabilitiesOptionalParams + ): Promise; } diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/registeredIdentities.ts b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/registeredIdentities.ts index 711cac167765..18e689eb4c82 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/registeredIdentities.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/registeredIdentities.ts @@ -12,8 +12,7 @@ import { RegisteredIdentitiesDeleteOptionalParams } from "../models"; export interface RegisteredIdentities { /** * Unregisters the given container from your Recovery Services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param identityName Name of the protection container to unregister. * @param options The options parameters. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/replicationUsages.ts b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/replicationUsages.ts index 5aa0b40d5410..c2e593985724 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/replicationUsages.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/replicationUsages.ts @@ -17,8 +17,7 @@ import { export interface ReplicationUsages { /** * Fetches the replication usages of the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/usages.ts b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/usages.ts index 704a2e737c98..46141add7b75 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/usages.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/usages.ts @@ -14,8 +14,7 @@ import { VaultUsage, UsagesListByVaultsOptionalParams } from "../models"; export interface Usages { /** * Fetches the usages of the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaultCertificates.ts b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaultCertificates.ts index 6f8e82f6c8a5..31332257e9b5 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaultCertificates.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaultCertificates.ts @@ -16,8 +16,7 @@ import { export interface VaultCertificates { /** * Uploads a certificate for a resource. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param certificateName Certificate friendly name. * @param certificateRequest Input parameters for uploading the vault certificate. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaultExtendedInfo.ts b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaultExtendedInfo.ts index 27d7ffc4f0be..ddbc18daa5e1 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaultExtendedInfo.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaultExtendedInfo.ts @@ -20,8 +20,7 @@ import { export interface VaultExtendedInfo { /** * Get the vault extended info. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -32,8 +31,7 @@ export interface VaultExtendedInfo { ): Promise; /** * Create vault extended info. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param resourceExtendedInfoDetails Details of ResourceExtendedInfo * @param options The options parameters. @@ -46,8 +44,7 @@ export interface VaultExtendedInfo { ): Promise; /** * Update vault extended info. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param resourceExtendedInfoDetails Details of ResourceExtendedInfo * @param options The options parameters. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaults.ts b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaults.ts index 54280d9d470b..238f4a7886dc 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaults.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/operationsInterfaces/vaults.ts @@ -34,8 +34,7 @@ export interface Vaults { ): PagedAsyncIterableIterator; /** * Retrieve a list of Vaults. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -44,8 +43,7 @@ export interface Vaults { ): PagedAsyncIterableIterator; /** * Get the Vault details. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -56,8 +54,7 @@ export interface Vaults { ): Promise; /** * Creates or updates a Recovery Services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param vault Recovery Services Vault to be created. * @param options The options parameters. @@ -75,8 +72,7 @@ export interface Vaults { >; /** * Creates or updates a Recovery Services vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param vault Recovery Services Vault to be created. * @param options The options parameters. @@ -89,8 +85,7 @@ export interface Vaults { ): Promise; /** * Deletes a vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param options The options parameters. */ @@ -101,8 +96,7 @@ export interface Vaults { ): Promise; /** * Updates the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param vault Recovery Services Vault to be created. * @param options The options parameters. @@ -117,8 +111,7 @@ export interface Vaults { >; /** * Updates the vault. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param vault Recovery Services Vault to be created. * @param options The options parameters. diff --git a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts index a1d44222b1fd..1d913710ff15 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts @@ -54,7 +54,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient { /** * Initializes a new instance of the RecoveryServicesClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The subscription Id. + * @param subscriptionId The ID of the target subscription. * @param options The parameter options */ constructor( @@ -78,7 +78,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-recoveryservices/5.1.0`; + const packageDetails = `azsdk-js-arm-recoveryservices/5.2.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -132,7 +132,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-04-01"; + this.apiVersion = options.apiVersion || "2022-10-01"; this.vaultCertificates = new VaultCertificatesImpl(this); this.registeredIdentities = new RegisteredIdentitiesImpl(this); this.replicationUsages = new ReplicationUsagesImpl(this); @@ -177,8 +177,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient { /** * Gets the operation status for a resource. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId * @param options The options parameters. @@ -197,8 +196,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient { /** * Gets the operation result for a resource. - * @param resourceGroupName The name of the resource group where the recovery services vault is - * present. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param vaultName The name of the recovery services vault. * @param operationId * @param options The options parameters. diff --git a/sdk/recoveryservices/arm-recoveryservices/test/sampleTest.ts b/sdk/recoveryservices/arm-recoveryservices/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/recoveryservices/arm-recoveryservices/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/recoveryservices/arm-recoveryservices/tsconfig.json b/sdk/recoveryservices/arm-recoveryservices/tsconfig.json index 8dfee3f17de0..3e6ae96443f3 100644 --- a/sdk/recoveryservices/arm-recoveryservices/tsconfig.json +++ b/sdk/recoveryservices/arm-recoveryservices/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-recoveryservices": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"