diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7e571d240b06..5b786958adc5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -833,6 +833,21 @@ packages: - supports-color dev: false + /@azure/arm-recoveryservices/5.3.0: + resolution: {integrity: sha512-6wZ/7T98bfvLzRl60hXBUi3Fd5dQgtwlN9RjOHncTJD8WYzaI/uIZ2OKOyRjT8KsU4E91I9h7gCjuCvJFzva1w==} + engines: {node: '>=14.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.4.0 + '@azure/core-client': 1.7.2 + '@azure/core-lro': 2.5.3 + '@azure/core-paging': 1.5.0 + '@azure/core-rest-pipeline': 1.10.3 + tslib: 2.5.2 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/arm-storage/17.2.1: resolution: {integrity: sha512-J2jmTPv8ZraSHDTz9l2Bx8gNL3ktfDDWo2mxWfzarn64O9Fjhb+l85YWyubGy2xUdeGuZPKzvQLltGv8bSu8eQ==} engines: {node: '>=12.0.0'} @@ -4695,7 +4710,7 @@ packages: dependencies: semver: 7.5.1 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230623 + typescript: 5.2.0-dev.20230624 dev: false /duplexer3/0.1.5: @@ -10149,8 +10164,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230623: - resolution: {integrity: sha512-IduDyLpZBJFdoFuHAXj0QfHwkT6GXtkki03deolpXnPG4R+wiVZGIyyzdS0lfVbFCVejcINPxxBs7ce6E5mp+A==} + /typescript/5.2.0-dev.20230624: + resolution: {integrity: sha512-n/E1V9TddYiQdoaPXXt7yWU214+n0pGWk82auTMaAkOAj4HJy+TLtaeNt4QjDhMLiF2yFCjVma8qNgD24X6VxQ==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -15762,10 +15777,11 @@ packages: dev: false file:projects/arm-recoveryservicesbackup.tgz: - resolution: {integrity: sha512-QI8BpZ4AD0+9hQVbh8Alwjh1HJATPwkTLbXLbKC3N3zrCY1RVkB3+IFEuohes/LVjmHZBh5Iv3plTqu27Qppug==, tarball: file:projects/arm-recoveryservicesbackup.tgz} + resolution: {integrity: sha512-xeTNlM+u1+GVltcw9Yc+HPvtPY5Pox4uZGJAgi4hT0nePiE4BUHnKDIRcIG4P/9WtMWkuMvNOrPv95rsb5bNQQ==, tarball: file:projects/arm-recoveryservicesbackup.tgz} name: '@rush-temp/arm-recoveryservicesbackup' version: 0.0.0 dependencies: + '@azure/arm-recoveryservices': 5.3.0 '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.35.0_@types+node@14.18.47 '@rollup/plugin-commonjs': 24.1.0_rollup@2.79.1 @@ -17923,7 +17939,7 @@ packages: dev: false file:projects/confidential-ledger.tgz: - resolution: {integrity: sha512-PFGdQJmKd/QIjnd0o3Yn9afHedMAGR/QPrL0HYCL/SvYVppbLhNmfiuCh3jAD0Pa7hz1M+JzTERWStBWCzQ2gg==, tarball: file:projects/confidential-ledger.tgz} + resolution: {integrity: sha512-cxXcoP19Ey/WDN+gBSbUX3c4qEjxEUb6xCNwYTPweJiPZyNoVpDzkkix60JgoGdj1A61jeMzvp5j7RhDXunoXg==, tarball: file:projects/confidential-ledger.tgz} name: '@rush-temp/confidential-ledger' version: 0.0.0 dependencies: @@ -17959,11 +17975,7 @@ packages: tslib: 2.5.2 typescript: 5.0.4 transitivePeerDependencies: - - bufferutil - - debug - - encoding - supports-color - - utf-8-validate dev: false file:projects/container-registry.tgz: diff --git a/sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md b/sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md index 1e951009d890..85e614ba27b4 100644 --- a/sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md +++ b/sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md @@ -1,15 +1,21 @@ # Release History + +## 5.4.0 (2023-06-25) + +**Features** -## 5.3.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface SoftDeleteSettings + - Added Type Alias MultiUserAuthorization + - Added Type Alias SecureScoreLevel + - Added Type Alias SoftDeleteState + - Interface SecuritySettings has a new optional parameter multiUserAuthorization + - Interface SecuritySettings has a new optional parameter softDeleteSettings + - Interface VaultProperties has a new optional parameter secureScore + - Added Enum KnownMultiUserAuthorization + - Added Enum KnownSecureScoreLevel + - Added Enum KnownSoftDeleteState + + ## 5.3.0 (2023-05-31) **Features** diff --git a/sdk/recoveryservices/arm-recoveryservices/_meta.json b/sdk/recoveryservices/arm-recoveryservices/_meta.json index 4cdfe7d962df..1175a89c5262 100644 --- a/sdk/recoveryservices/arm-recoveryservices/_meta.json +++ b/sdk/recoveryservices/arm-recoveryservices/_meta.json @@ -1,8 +1,8 @@ { - "commit": "73d8ea03558929411b9f2e6be533e63409a2252c", + "commit": "a47b186bb893483daebf98f21f65e29bfd449034", "readme": "specification/recoveryservices/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservices\\resource-manager\\readme.md --use=@autorest/typescript@6.0.2 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/recoveryservices/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", - "use": "@autorest/typescript@6.0.2" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/recoveryservices/arm-recoveryservices/package.json b/sdk/recoveryservices/arm-recoveryservices/package.json index 65dd52ee3ffc..d6ca35b08e8c 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.3.1", + "version": "5.4.0", "engines": { "node": ">=14.0.0" }, @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservices/arm-recoveryservices", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservices?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservices/arm-recoveryservices" +} \ 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 6d9dd576ae77..3d03b272ccfd 100644 --- a/sdk/recoveryservices/arm-recoveryservices/review/arm-recoveryservices.api.md +++ b/sdk/recoveryservices/arm-recoveryservices/review/arm-recoveryservices.api.md @@ -266,6 +266,13 @@ export enum KnownInfrastructureEncryptionState { Enabled = "Enabled" } +// @public +export enum KnownMultiUserAuthorization { + Disabled = "Disabled", + Enabled = "Enabled", + Invalid = "Invalid" +} + // @public export enum KnownPrivateEndpointConnectionStatus { Approved = "Approved", @@ -310,12 +317,28 @@ export enum KnownResourceMoveState { Unknown = "Unknown" } +// @public +export enum KnownSecureScoreLevel { + Adequate = "Adequate", + Maximum = "Maximum", + Minimum = "Minimum", + None = "None" +} + // @public export enum KnownSkuName { RS0 = "RS0", Standard = "Standard" } +// @public +export enum KnownSoftDeleteState { + AlwaysON = "AlwaysON", + Disabled = "Disabled", + Enabled = "Enabled", + Invalid = "Invalid" +} + // @public export enum KnownStandardTierStorageRedundancy { GeoRedundant = "GeoRedundant", @@ -376,6 +399,9 @@ export interface MonitoringSummary { unsupportedProviderCount?: number; } +// @public +export type MultiUserAuthorization = string; + // @public export interface NameInfo { localizedValue?: string; @@ -672,9 +698,14 @@ export interface RestoreSettings { crossSubscriptionRestoreSettings?: CrossSubscriptionRestoreSettings; } +// @public +export type SecureScoreLevel = string; + // @public export interface SecuritySettings { immutabilitySettings?: ImmutabilitySettings; + readonly multiUserAuthorization?: MultiUserAuthorization; + softDeleteSettings?: SoftDeleteSettings; } // @public @@ -689,6 +720,16 @@ export interface Sku { // @public export type SkuName = string; +// @public +export interface SoftDeleteSettings { + softDeleteRetentionPeriodInDays?: number; + // (undocumented) + softDeleteState?: SoftDeleteState; +} + +// @public +export type SoftDeleteState = string; + // @public export type StandardTierStorageRedundancy = string; @@ -835,6 +876,7 @@ export interface VaultProperties { publicNetworkAccess?: PublicNetworkAccess; redundancySettings?: VaultPropertiesRedundancySettings; restoreSettings?: RestoreSettings; + readonly secureScore?: SecureScoreLevel; securitySettings?: SecuritySettings; upgradeDetails?: UpgradeDetails; } diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts index 85d21da4564c..99c9c8af0e37 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/index.ts @@ -333,6 +333,11 @@ export interface VaultProperties { redundancySettings?: VaultPropertiesRedundancySettings; /** Security Settings of the vault */ securitySettings?: SecuritySettings; + /** + * Secure Score of Recovery Services Vault + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly secureScore?: SecureScoreLevel; } /** Details for upgrading vault. */ @@ -562,6 +567,13 @@ export interface VaultPropertiesRedundancySettings { export interface SecuritySettings { /** Immutability Settings of a vault */ immutabilitySettings?: ImmutabilitySettings; + /** Soft delete Settings of a vault */ + softDeleteSettings?: SoftDeleteSettings; + /** + * MUA Settings of a vault + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly multiUserAuthorization?: MultiUserAuthorization; } /** Immutability Settings of vault */ @@ -569,6 +581,13 @@ export interface ImmutabilitySettings { state?: ImmutabilityState; } +/** Soft delete Settings of vault */ +export interface SoftDeleteSettings { + softDeleteState?: SoftDeleteState; + /** Soft delete retention period in days */ + softDeleteRetentionPeriodInDays?: number; +} + /** 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 */ @@ -1203,6 +1222,75 @@ export enum KnownImmutabilityState { */ export type ImmutabilityState = string; +/** Known values of {@link SoftDeleteState} that the service accepts. */ +export enum KnownSoftDeleteState { + /** Invalid */ + Invalid = "Invalid", + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", + /** AlwaysON */ + AlwaysON = "AlwaysON" +} + +/** + * Defines values for SoftDeleteState. \ + * {@link KnownSoftDeleteState} can be used interchangeably with SoftDeleteState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Enabled** \ + * **Disabled** \ + * **AlwaysON** + */ +export type SoftDeleteState = string; + +/** Known values of {@link MultiUserAuthorization} that the service accepts. */ +export enum KnownMultiUserAuthorization { + /** Invalid */ + Invalid = "Invalid", + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for MultiUserAuthorization. \ + * {@link KnownMultiUserAuthorization} can be used interchangeably with MultiUserAuthorization, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Enabled** \ + * **Disabled** + */ +export type MultiUserAuthorization = string; + +/** Known values of {@link SecureScoreLevel} that the service accepts. */ +export enum KnownSecureScoreLevel { + /** None */ + None = "None", + /** Minimum */ + Minimum = "Minimum", + /** Adequate */ + Adequate = "Adequate", + /** Maximum */ + Maximum = "Maximum" +} + +/** + * Defines values for SecureScoreLevel. \ + * {@link KnownSecureScoreLevel} can be used interchangeably with SecureScoreLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Minimum** \ + * **Adequate** \ + * **Maximum** + */ +export type SecureScoreLevel = string; + /** Known values of {@link SkuName} that the service accepts. */ export enum KnownSkuName { /** Standard */ diff --git a/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts b/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts index af3075cd5378..0b0460ea2650 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts @@ -791,6 +791,13 @@ export const VaultProperties: coreClient.CompositeMapper = { name: "Composite", className: "SecuritySettings" } + }, + secureScore: { + serializedName: "secureScore", + readOnly: true, + type: { + name: "String" + } } } } @@ -1226,6 +1233,20 @@ export const SecuritySettings: coreClient.CompositeMapper = { name: "Composite", className: "ImmutabilitySettings" } + }, + softDeleteSettings: { + serializedName: "softDeleteSettings", + type: { + name: "Composite", + className: "SoftDeleteSettings" + } + }, + multiUserAuthorization: { + serializedName: "multiUserAuthorization", + readOnly: true, + type: { + name: "String" + } } } } @@ -1246,6 +1267,27 @@ export const ImmutabilitySettings: coreClient.CompositeMapper = { } }; +export const SoftDeleteSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SoftDeleteSettings", + modelProperties: { + softDeleteState: { + serializedName: "softDeleteState", + type: { + name: "String" + } + }, + softDeleteRetentionPeriodInDays: { + serializedName: "softDeleteRetentionPeriodInDays", + type: { + name: "Number" + } + } + } + } +}; + export const Sku: 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 4a875a6c0657..e40bfbee822a 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/models/parameters.ts @@ -78,7 +78,7 @@ export const subscriptionId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-02-01", + defaultValue: "2023-04-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts index 8cd31c78dbf0..58d3b9e6488d 100644 --- a/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts +++ b/sdk/recoveryservices/arm-recoveryservices/src/recoveryServicesClient.ts @@ -78,7 +78,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-recoveryservices/5.3.1`; + const packageDetails = `azsdk-js-arm-recoveryservices/5.4.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -131,7 +131,7 @@ export class RecoveryServicesClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-02-01"; + this.apiVersion = options.apiVersion || "2023-04-01"; this.vaultCertificates = new VaultCertificatesImpl(this); this.registeredIdentities = new RegisteredIdentitiesImpl(this); this.replicationUsages = new ReplicationUsagesImpl(this); 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"