Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR @azure/arm-dataprotection] Dev dataprotection microsoft.data protection 2023 08 01 #7266

Closed
wants to merge 1 commit into from
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
742 changes: 372 additions & 370 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

26 changes: 17 additions & 9 deletions sdk/dataprotection/arm-dataprotection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# Release History

## 2.0.0 (2023-11-09)

**Features**

## 1.2.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed
- Added Interface DefaultResourceProperties
- Added Interface KubernetesClusterVaultTierRestoreCriteria
- Added Type Alias BaseResourcePropertiesUnion
- Added Type Alias ResourcePropertiesObjectType
- Type of parameter objectType of interface ItemLevelRestoreCriteria is changed from "ItemPathBasedRestoreCriteria" | "RangeBasedItemLevelRestoreCriteria" | "KubernetesStorageClassRestoreCriteria" | "KubernetesPVRestoreCriteria" | "KubernetesClusterRestoreCriteria" to "ItemPathBasedRestoreCriteria" | "RangeBasedItemLevelRestoreCriteria" | "KubernetesStorageClassRestoreCriteria" | "KubernetesPVRestoreCriteria" | "KubernetesClusterRestoreCriteria" | "KubernetesClusterVaultTierRestoreCriteria"
- Added Enum KnownResourcePropertiesObjectType

### Other Changes
**Breaking Changes**

- Type of parameter objectType of interface BaseResourceProperties is changed from "BaseResourceProperties" to "DefaultResourceProperties"
- Type of parameter resourceProperties of interface Datasource is changed from BaseResourceProperties to BaseResourcePropertiesUnion
- Type of parameter resourceProperties of interface DatasourceSet is changed from BaseResourceProperties to BaseResourcePropertiesUnion


## 1.2.0 (2023-07-10)

**Features**
Expand Down Expand Up @@ -62,4 +70,4 @@

## 1.0.0 (2023-03-08)

The package of @azure/arm-dataprotection is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ).
The package of @azure/arm-dataprotection is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
8 changes: 4 additions & 4 deletions sdk/dataprotection/arm-dataprotection/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "0f39a2d56070d2bc4251494525cb8af88583a938",
"commit": "3dca2af9edb5e80f0e9c3d04b3eac512d44f7565",
"readme": "specification/dataprotection/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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\dataprotection\\resource-manager\\readme.md --use=@autorest/typescript@6.0.5 --generate-sample=true",
"autorest_command": "autorest --version=3.9.7 --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/dataprotection/resource-manager/readme.md --use=@autorest/typescript@^6.0.12",
"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.5"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.4",
"use": "@autorest/typescript@^6.0.12"
}
26 changes: 10 additions & 16 deletions sdk/dataprotection/arm-dataprotection/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for DataProtectionClient.",
"version": "1.2.1",
"version": "2.0.0",
"engines": {
"node": ">=18.0.0"
},
"dependencies": {
"@azure/core-lro": "^2.5.3",
"@azure/core-lro": "^2.5.4",
"@azure/abort-controller": "^1.0.0",
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.7.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"@azure/core-rest-pipeline": "^1.12.0",
"tslib": "^2.2.0"
},
"keywords": [
Expand All @@ -32,17 +32,19 @@
"mkdirp": "^2.1.2",
"typescript": "~5.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"rimraf": "^5.0.0",
"dotenv": "^16.0.0",
"@azure/dev-tool": "^1.0.0",
"@azure/identity": "^3.3.0",
"@azure-tools/test-recorder": "^3.0.0",
"@azure-tools/test-credential": "^1.0.0",
"mocha": "^10.0.0",
"@types/mocha": "^10.0.0",
"esm": "^3.2.18",
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^18.0.0",
"@azure/dev-tool": "^1.0.0",
"ts-node": "^10.0.0"
},
"repository": {
Expand Down Expand Up @@ -77,7 +79,7 @@
"extract-api": "api-extractor run --local",
"lint": "echo skipped",
"audit": "echo skipped",
"clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"build:node": "echo skipped",
"build:browser": "echo skipped",
"build:test": "echo skipped",
Expand Down Expand Up @@ -105,13 +107,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/dataprotection/arm-dataprotection",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-dataprotection?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/dataprotection/arm-dataprotection"
}
Original file line number Diff line number Diff line change
Expand Up @@ -733,9 +733,12 @@ export type BasePolicyRuleUnion = BasePolicyRule | AzureBackupRule | AzureRetent

// @public
export interface BaseResourceProperties {
objectType: "BaseResourceProperties";
objectType: "DefaultResourceProperties";
}

// @public (undocumented)
export type BaseResourcePropertiesUnion = BaseResourceProperties | DefaultResourceProperties;

// @public
export interface BlobBackupDatasourceParameters extends BackupDatasourceParameters {
containersList: string[];
Expand Down Expand Up @@ -934,7 +937,7 @@ export interface Datasource {
resourceID: string;
resourceLocation?: string;
resourceName?: string;
resourceProperties?: BaseResourceProperties;
resourceProperties?: BaseResourcePropertiesUnion;
resourceType?: string;
resourceUri?: string;
}
Expand All @@ -946,7 +949,7 @@ export interface DatasourceSet {
resourceID: string;
resourceLocation?: string;
resourceName?: string;
resourceProperties?: BaseResourceProperties;
resourceProperties?: BaseResourcePropertiesUnion;
resourceType?: string;
resourceUri?: string;
}
Expand Down Expand Up @@ -978,6 +981,11 @@ export interface Day {
// @public
export type DayOfWeek = string;

// @public
export interface DefaultResourceProperties extends BaseResourceProperties {
objectType: "DefaultResourceProperties";
}

// @public
export interface DeletedBackupInstance extends BackupInstance {
readonly deletionInfo?: DeletionInfo;
Expand Down Expand Up @@ -1320,11 +1328,11 @@ export interface InnerError {

// @public
export interface ItemLevelRestoreCriteria {
objectType: "ItemPathBasedRestoreCriteria" | "RangeBasedItemLevelRestoreCriteria" | "KubernetesStorageClassRestoreCriteria" | "KubernetesPVRestoreCriteria" | "KubernetesClusterRestoreCriteria";
objectType: "ItemPathBasedRestoreCriteria" | "RangeBasedItemLevelRestoreCriteria" | "KubernetesStorageClassRestoreCriteria" | "KubernetesPVRestoreCriteria" | "KubernetesClusterRestoreCriteria" | "KubernetesClusterVaultTierRestoreCriteria";
}

// @public (undocumented)
export type ItemLevelRestoreCriteriaUnion = ItemLevelRestoreCriteria | ItemPathBasedRestoreCriteria | RangeBasedItemLevelRestoreCriteria | KubernetesStorageClassRestoreCriteria | KubernetesPVRestoreCriteria | KubernetesClusterRestoreCriteria;
export type ItemLevelRestoreCriteriaUnion = ItemLevelRestoreCriteria | ItemPathBasedRestoreCriteria | RangeBasedItemLevelRestoreCriteria | KubernetesStorageClassRestoreCriteria | KubernetesPVRestoreCriteria | KubernetesClusterRestoreCriteria | KubernetesClusterVaultTierRestoreCriteria;

// @public
export interface ItemLevelRestoreTargetInfo extends RestoreTargetInfoBase {
Expand Down Expand Up @@ -1559,6 +1567,11 @@ export enum KnownResourceMoveState {
Unknown = "Unknown"
}

// @public
export enum KnownResourcePropertiesObjectType {
DefaultResourceProperties = "DefaultResourceProperties"
}

// @public
export enum KnownRestoreSourceDataStoreType {
ArchiveStore = "ArchiveStore",
Expand Down Expand Up @@ -1678,6 +1691,25 @@ export interface KubernetesClusterRestoreCriteria extends ItemLevelRestoreCriter
restoreHookReferences?: NamespacedNameResource[];
}

// @public
export interface KubernetesClusterVaultTierRestoreCriteria extends ItemLevelRestoreCriteria {
conflictPolicy?: ExistingResourcePolicy;
excludedNamespaces?: string[];
excludedResourceTypes?: string[];
includeClusterScopeResources: boolean;
includedNamespaces?: string[];
includedResourceTypes?: string[];
labelSelectors?: string[];
namespaceMappings?: {
[propertyName: string]: string;
};
objectType: "KubernetesClusterVaultTierRestoreCriteria";
persistentVolumeRestoreMode?: PersistentVolumeRestoreMode;
restoreHookReferences?: NamespacedNameResource[];
stagingResourceGroupId?: string;
stagingStorageAccountId?: string;
}

// @public
export interface KubernetesPVRestoreCriteria extends ItemLevelRestoreCriteria {
name?: string;
Expand Down Expand Up @@ -2185,6 +2217,9 @@ export interface ResourceMoveDetails {
// @public
export type ResourceMoveState = string;

// @public
export type ResourcePropertiesObjectType = string;

// @public (undocumented)
export interface RestorableTimeRange {
endTime: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class DataProtectionClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-dataprotection/1.2.1`;
const packageDetails = `azsdk-js-arm-dataprotection/2.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -155,7 +155,7 @@ export class DataProtectionClient extends coreClient.ServiceClient {

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2023-05-01";
this.apiVersion = options.apiVersion || "2023-08-01";
this.backupVaults = new BackupVaultsImpl(this);
this.operationResult = new OperationResultImpl(this);
this.operationStatus = new OperationStatusImpl(this);
Expand Down
67 changes: 62 additions & 5 deletions sdk/dataprotection/arm-dataprotection/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export type FeatureValidationResponseBaseUnion =
| FeatureValidationResponseBase
| FeatureValidationResponse;
export type BaseBackupPolicyUnion = BaseBackupPolicy | BackupPolicy;
export type BaseResourcePropertiesUnion =
| BaseResourceProperties
| DefaultResourceProperties;
export type DataStoreParametersUnion =
| DataStoreParameters
| AzureOperationalStoreParameters;
Expand Down Expand Up @@ -62,7 +65,8 @@ export type ItemLevelRestoreCriteriaUnion =
| RangeBasedItemLevelRestoreCriteria
| KubernetesStorageClassRestoreCriteria
| KubernetesPVRestoreCriteria
| KubernetesClusterRestoreCriteria;
| KubernetesClusterRestoreCriteria
| KubernetesClusterVaultTierRestoreCriteria;
export type AzureBackupRecoveryPointBasedRestoreRequestUnion =
| AzureBackupRecoveryPointBasedRestoreRequest
| AzureBackupRestoreWithRehydrationRequest;
Expand Down Expand Up @@ -532,13 +536,13 @@ export interface Datasource {
/** Uri of the resource. */
resourceUri?: string;
/** Properties specific to data source */
resourceProperties?: BaseResourceProperties;
resourceProperties?: BaseResourcePropertiesUnion;
}

/** Properties which are specific to datasource/datasourceSets */
export interface BaseResourceProperties {
/** Polymorphic discriminator, which specifies the different types this object can be */
objectType: "BaseResourceProperties";
objectType: "DefaultResourceProperties";
}

/** DatasourceSet details of datasource to be backed up */
Expand All @@ -558,7 +562,7 @@ export interface DatasourceSet {
/** Uri of the resource. */
resourceUri?: string;
/** Properties specific to data source set */
resourceProperties?: BaseResourceProperties;
resourceProperties?: BaseResourcePropertiesUnion;
}

/** Policy Info in backupInstance */
Expand Down Expand Up @@ -1244,7 +1248,8 @@ export interface ItemLevelRestoreCriteria {
| "RangeBasedItemLevelRestoreCriteria"
| "KubernetesStorageClassRestoreCriteria"
| "KubernetesPVRestoreCriteria"
| "KubernetesClusterRestoreCriteria";
| "KubernetesClusterRestoreCriteria"
| "KubernetesClusterVaultTierRestoreCriteria";
}

/** Class encapsulating target details, used where the destination is not a datasource */
Expand Down Expand Up @@ -1426,6 +1431,12 @@ export interface DeletedBackupInstance extends BackupInstance {
readonly deletionInfo?: DeletionInfo;
}

/** Default source properties */
export interface DefaultResourceProperties extends BaseResourceProperties {
/** Polymorphic discriminator, which specifies the different types this object can be */
objectType: "DefaultResourceProperties";
}

/** Parameters for Operational-Tier DataStore */
export interface AzureOperationalStoreParameters extends DataStoreParameters {
/** Polymorphic discriminator, which specifies the different types this object can be */
Expand Down Expand Up @@ -1728,6 +1739,37 @@ export interface KubernetesClusterRestoreCriteria
restoreHookReferences?: NamespacedNameResource[];
}

/** kubernetes Cluster Backup target info for restore operation from vault */
export interface KubernetesClusterVaultTierRestoreCriteria
extends ItemLevelRestoreCriteria {
/** Polymorphic discriminator, which specifies the different types this object can be */
objectType: "KubernetesClusterVaultTierRestoreCriteria";
/** Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources during restore from vault. */
includeClusterScopeResources: boolean;
/** Gets or sets the include namespaces property. This property sets the namespaces to be included during restore from vault. */
includedNamespaces?: string[];
/** Gets or sets the exclude namespaces property. This property sets the namespaces to be excluded during restore from vault. */
excludedNamespaces?: string[];
/** Gets or sets the include resource types property. This property sets the resource types to be included during restore from vault. */
includedResourceTypes?: string[];
/** Gets or sets the exclude resource types property. This property sets the resource types to be excluded during restore from vault. */
excludedResourceTypes?: string[];
/** Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during restore from vault. */
labelSelectors?: string[];
/** Gets or sets the PV (Persistent Volume) Restore Mode property. This property sets whether volumes needs to be restored from vault. */
persistentVolumeRestoreMode?: PersistentVolumeRestoreMode;
/** Gets or sets the Conflict Policy property. This property sets policy during conflict of resources during restore from vault. */
conflictPolicy?: ExistingResourcePolicy;
/** Gets or sets the Namespace Mappings property. This property sets if namespace needs to be change during restore from vault. */
namespaceMappings?: { [propertyName: string]: string };
/** Gets or sets the restore hook references. This property sets the hook reference to be executed during restore from vault. */
restoreHookReferences?: NamespacedNameResource[];
/** Gets or sets the staging RG Id for creating staging disks and snapshots during restore from vault. */
stagingResourceGroupId?: string;
/** Gets or sets the staging Storage Account Id for creating backup extension object store data during restore from vault. */
stagingStorageAccountId?: string;
}

/** Backup Vault Resource */
export interface BackupVaultResource extends DppTrackedResource {
/** BackupVaultResource properties */
Expand Down Expand Up @@ -2152,6 +2194,21 @@ export enum KnownCreatedByType {
*/
export type CreatedByType = string;

/** Known values of {@link ResourcePropertiesObjectType} that the service accepts. */
export enum KnownResourcePropertiesObjectType {
/** DefaultResourceProperties */
DefaultResourceProperties = "DefaultResourceProperties"
}

/**
* Defines values for ResourcePropertiesObjectType. \
* {@link KnownResourcePropertiesObjectType} can be used interchangeably with ResourcePropertiesObjectType,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **DefaultResourceProperties**
*/
export type ResourcePropertiesObjectType = string;

/** Known values of {@link DataStoreTypes} that the service accepts. */
export enum KnownDataStoreTypes {
/** OperationalStore */
Expand Down
Loading