Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions sdk/recoveryservices/arm-recoveryservices/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Release History

## 5.2.0 (2022-10-24)

**Features**

- Added Interface ImmutabilitySettings
- Added Interface SecuritySettings
- Added Type Alias ImmutabilityState
- Interface VaultProperties has a new optional parameter securitySettings
- Added Enum KnownImmutabilityState


## 5.1.0 (2022-07-22)

**Features**
Expand Down
8 changes: 4 additions & 4 deletions sdk/recoveryservices/arm-recoveryservices/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "405811c51aa09803caedfe17fd305e110db1ca5e",
"commit": "d3642ca0ca2c359c188d67cd98ebf0c42c33181f",
"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.4.4",
"use": "@autorest/typescript@6.0.0-rc.2"
}
14 changes: 3 additions & 11 deletions sdk/recoveryservices/arm-recoveryservices/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,15 @@ export interface IdentityData {
};
}

// @public
export interface ImmutabilitySettings {
// (undocumented)
state?: ImmutabilityState;
}

// @public
export type ImmutabilityState = string;

// @public
export type InfrastructureEncryptionState = string;

Expand Down Expand Up @@ -198,6 +207,13 @@ export enum KnownCrossRegionRestore {
Enabled = "Enabled"
}

// @public
export enum KnownImmutabilityState {
Disabled = "Disabled",
Locked = "Locked",
Unlocked = "Unlocked"
}

// @public
export enum KnownInfrastructureEncryptionState {
Disabled = "Disabled",
Expand Down Expand Up @@ -570,6 +586,11 @@ export type ResourceIdentityType = string;
// @public
export type ResourceMoveState = string;

// @public
export interface SecuritySettings {
immutabilitySettings?: ImmutabilitySettings;
}

// @public
export interface Sku {
capacity?: string;
Expand Down Expand Up @@ -726,6 +747,7 @@ export interface VaultProperties {
readonly privateEndpointStateForSiteRecovery?: VaultPrivateEndpointState;
readonly provisioningState?: string;
redundancySettings?: VaultPropertiesRedundancySettings;
securitySettings?: SecuritySettings;
upgradeDetails?: UpgradeDetails;
}

Expand Down
34 changes: 34 additions & 0 deletions sdk/recoveryservices/arm-recoveryservices/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ export interface VaultProperties {
monitoringSettings?: MonitoringSettings;
/** The redundancy Settings of a Vault */
redundancySettings?: VaultPropertiesRedundancySettings;
/** Security Settings of the vault */
securitySettings?: SecuritySettings;
}

/** Details for upgrading vault. */
Expand Down Expand Up @@ -517,6 +519,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 */
Expand Down Expand Up @@ -1052,6 +1065,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 */
Expand Down
38 changes: 38 additions & 0 deletions sdk/recoveryservices/arm-recoveryservices/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,13 @@ export const VaultProperties: coreClient.CompositeMapper = {
name: "Composite",
className: "VaultPropertiesRedundancySettings"
}
},
securitySettings: {
serializedName: "securitySettings",
type: {
name: "Composite",
className: "SecuritySettings"
}
}
}
}
Expand Down Expand Up @@ -1080,6 +1087,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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const subscriptionId: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2022-04-01",
defaultValue: "2022-09-10",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down Expand Up @@ -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-09-10";
this.vaultCertificates = new VaultCertificatesImpl(this);
this.registeredIdentities = new RegisteredIdentitiesImpl(this);
this.replicationUsages = new ReplicationUsagesImpl(this);
Expand Down
43 changes: 43 additions & 0 deletions sdk/recoveryservices/arm-recoveryservices/test/sampleTest.ts
Original file line number Diff line number Diff line change
@@ -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<string, string> = {
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!");
});
});
10 changes: 2 additions & 8 deletions sdk/recoveryservices/arm-recoveryservices/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down