Skip to content

Commit

Permalink
CodeGen from PR 24011 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 753c9ce8385cc93154c1225f999113427e292b55 into eae8ca2f90c2deb68688f5b1bbba9a5efcc0e42e
  • Loading branch information
SDKAuto committed Jun 20, 2023
1 parent 1ab470e commit d2f4d8e
Show file tree
Hide file tree
Showing 10 changed files with 473 additions and 37 deletions.
29 changes: 29 additions & 0 deletions sdk/dataprotection/arm-dataprotection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Release History

## 2.0.0 (2023-06-20)

**Features**

- Added Interface BaseResourceProperties
- Added Interface CrossRegionRestoreSettings
- Added Interface IdentityDetails
- Added Interface NamespacedNameResource
- Added Interface UserAssignedIdentity
- Added Type Alias CrossRegionRestoreState
- Added Type Alias SecureScoreLevel
- Interface AzureBackupJob has a new optional parameter rehydrationPriority
- Interface AzureBackupRestoreRequest has a new optional parameter identityDetails
- Interface BackupInstance has a new optional parameter identityDetails
- Interface BackupVault has a new optional parameter secureScore
- Interface Datasource has a new optional parameter resourceProperties
- Interface DatasourceSet has a new optional parameter resourceProperties
- Interface DppIdentityDetails has a new optional parameter userAssignedIdentities
- Interface FeatureSettings has a new optional parameter crossRegionRestoreSettings
- Interface KubernetesClusterBackupDatasourceParameters has a new optional parameter backupHookReferences
- Interface KubernetesClusterRestoreCriteria has a new optional parameter restoreHookReferences
- Added Enum KnownCrossRegionRestoreState
- Added Enum KnownSecureScoreLevel

**Breaking Changes**

- Class DataProtectionClient has a new signature


## 1.1.0 (2023-06-12)

**Features**
Expand Down
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": "1b33e81bbdc28fcd6644a1315b8d7b1b6d030590",
"commit": "edc7205cdc4b1e98db83ebbf3d3ac12b32b9fedc",
"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/[email protected].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/dataprotection/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/[email protected].0",
"use": "@autorest/[email protected].2"
"release_tool": "@azure-tools/[email protected].1",
"use": "@autorest/typescript@^6.0.4"
}
12 changes: 2 additions & 10 deletions sdk/dataprotection/arm-dataprotection/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 DataProtectionClient.",
"version": "1.1.0",
"version": "2.0.0",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -111,13 +111,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 @@ -126,6 +126,7 @@ export interface AzureBackupJob {
readonly policyName?: string;
progressEnabled: boolean;
readonly progressUrl?: string;
readonly rehydrationPriority?: string;
readonly restoreType?: string;
// (undocumented)
sourceDataStoreName?: string;
Expand Down Expand Up @@ -197,6 +198,7 @@ export interface AzureBackupRehydrationRequest {

// @public
export interface AzureBackupRestoreRequest {
identityDetails?: IdentityDetails;
objectType: "AzureBackupRecoveryPointBasedRestoreRequest" | "AzureBackupRestoreWithRehydrationRequest" | "AzureBackupRecoveryTimeBasedRestoreRequest";
restoreTargetInfo: RestoreTargetInfoBaseUnion;
sourceDataStoreType: SourceDataStoreType;
Expand Down Expand Up @@ -265,6 +267,7 @@ export interface BackupInstance {
dataSourceInfo: Datasource;
dataSourceSetInfo?: DatasourceSet;
friendlyName?: string;
identityDetails?: IdentityDetails;
// (undocumented)
objectType: string;
policyInfo: PolicyInfo;
Expand Down Expand Up @@ -584,6 +587,7 @@ export interface BackupVault {
readonly provisioningState?: ProvisioningState;
readonly resourceMoveDetails?: ResourceMoveDetails;
readonly resourceMoveState?: ResourceMoveState;
readonly secureScore?: SecureScoreLevel;
securitySettings?: SecuritySettings;
storageSettings: StorageSetting[];
}
Expand Down Expand Up @@ -727,6 +731,11 @@ export interface BasePolicyRule {
// @public (undocumented)
export type BasePolicyRuleUnion = BasePolicyRule | AzureBackupRule | AzureRetentionRule;

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

// @public
export interface BlobBackupDatasourceParameters extends BackupDatasourceParameters {
containersList: string[];
Expand Down Expand Up @@ -807,6 +816,14 @@ export type CopyOptionUnion = CopyOption | CopyOnExpiryOption | CustomCopyOption
// @public
export type CreatedByType = string;

// @public (undocumented)
export interface CrossRegionRestoreSettings {
state?: CrossRegionRestoreState;
}

// @public
export type CrossRegionRestoreState = string;

// @public
export interface CrossSubscriptionRestoreSettings {
state?: CrossSubscriptionRestoreState;
Expand Down Expand Up @@ -841,6 +858,7 @@ export class DataProtectionClient extends coreClient.ServiceClient {
// (undocumented)
$host: string;
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: DataProtectionClientOptionalParams);
constructor(credentials: coreAuth.TokenCredential, options?: DataProtectionClientOptionalParams);
// (undocumented)
apiVersion: string;
// (undocumented)
Expand Down Expand Up @@ -880,7 +898,7 @@ export class DataProtectionClient extends coreClient.ServiceClient {
// (undocumented)
restorableTimeRanges: RestorableTimeRanges;
// (undocumented)
subscriptionId: string;
subscriptionId?: string;
}

// @public
Expand Down Expand Up @@ -916,6 +934,7 @@ export interface Datasource {
resourceID: string;
resourceLocation?: string;
resourceName?: string;
resourceProperties?: BaseResourceProperties;
resourceType?: string;
resourceUri?: string;
}
Expand All @@ -927,6 +946,7 @@ export interface DatasourceSet {
resourceID: string;
resourceLocation?: string;
resourceName?: string;
resourceProperties?: BaseResourceProperties;
resourceType?: string;
resourceUri?: string;
}
Expand Down Expand Up @@ -1058,6 +1078,9 @@ export interface DppIdentityDetails {
readonly principalId?: string;
readonly tenantId?: string;
type?: string;
userAssignedIdentities?: {
[propertyName: string]: UserAssignedIdentity;
};
}

// @public (undocumented)
Expand Down Expand Up @@ -1223,6 +1246,8 @@ export type ExportJobsTriggerResponse = ExportJobsTriggerHeaders;

// @public
export interface FeatureSettings {
// (undocumented)
crossRegionRestoreSettings?: CrossRegionRestoreSettings;
crossSubscriptionRestoreSettings?: CrossSubscriptionRestoreSettings;
}

Expand Down Expand Up @@ -1265,6 +1290,12 @@ export type FeatureValidationResponseBaseUnion = FeatureValidationResponseBase |
// @public
export function getContinuationToken(page: unknown): string | undefined;

// @public (undocumented)
export interface IdentityDetails {
userAssignedIdentityArmUrl?: string;
useSystemAssignedIdentity?: boolean;
}

// @public
export interface ImmediateCopyOption extends CopyOption {
objectType: "ImmediateCopyOption";
Expand Down Expand Up @@ -1386,6 +1417,12 @@ export enum KnownCreatedByType {
User = "User"
}

// @public
export enum KnownCrossRegionRestoreState {
Disabled = "Disabled",
Enabled = "Enabled"
}

// @public
export enum KnownCrossSubscriptionRestoreState {
Disabled = "Disabled",
Expand Down Expand Up @@ -1542,6 +1579,15 @@ export enum KnownSecretStoreType {
Invalid = "Invalid"
}

// @public
export enum KnownSecureScoreLevel {
Adequate = "Adequate",
Maximum = "Maximum",
Minimum = "Minimum",
None = "None",
NotSupported = "NotSupported"
}

// @public
export enum KnownSoftDeleteState {
AlwaysOn = "AlwaysOn",
Expand Down Expand Up @@ -1604,6 +1650,7 @@ export enum KnownWeekNumber {

// @public
export interface KubernetesClusterBackupDatasourceParameters extends BackupDatasourceParameters {
backupHookReferences?: NamespacedNameResource[];
excludedNamespaces?: string[];
excludedResourceTypes?: string[];
includeClusterScopeResources: boolean;
Expand All @@ -1628,6 +1675,7 @@ export interface KubernetesClusterRestoreCriteria extends ItemLevelRestoreCriter
};
objectType: "KubernetesClusterRestoreCriteria";
persistentVolumeRestoreMode?: PersistentVolumeRestoreMode;
restoreHookReferences?: NamespacedNameResource[];
}

// @public
Expand All @@ -1652,6 +1700,12 @@ export interface MonitoringSettings {
// @public
export type Month = string;

// @public
export interface NamespacedNameResource {
name?: string;
namespace?: string;
}

// @public
export interface OperationExtendedInfo {
objectType: "OperationJobExtendedInfo";
Expand Down Expand Up @@ -2231,6 +2285,9 @@ export interface SecretStoreResource {
// @public
export type SecretStoreType = string;

// @public
export type SecureScoreLevel = string;

// @public
export interface SecuritySettings {
immutabilitySettings?: ImmutabilitySettings;
Expand Down Expand Up @@ -2345,6 +2402,12 @@ export interface UnlockDeleteResponse {
unlockDeleteExpiryTime?: string;
}

// @public
export interface UserAssignedIdentity {
readonly clientId?: string;
readonly principalId?: string;
}

// @public
export interface UserFacingError {
code?: string;
Expand Down
24 changes: 19 additions & 5 deletions sdk/dataprotection/arm-dataprotection/src/dataProtectionClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import { DataProtectionClientOptionalParams } from "./models";
export class DataProtectionClient extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;
subscriptionId?: string;

/**
* Initializes a new instance of the DataProtectionClient class.
Expand All @@ -71,12 +71,26 @@ export class DataProtectionClient extends coreClient.ServiceClient {
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: DataProtectionClientOptionalParams
);
constructor(
credentials: coreAuth.TokenCredential,
options?: DataProtectionClientOptionalParams
);
constructor(
credentials: coreAuth.TokenCredential,
subscriptionIdOrOptions?: DataProtectionClientOptionalParams | string,
options?: DataProtectionClientOptionalParams
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");

let subscriptionId: string | undefined;

if (typeof subscriptionIdOrOptions === "string") {
subscriptionId = subscriptionIdOrOptions;
} else if (typeof subscriptionIdOrOptions === "object") {
options = subscriptionIdOrOptions;
}

// Initializing default values for options
Expand All @@ -88,7 +102,7 @@ export class DataProtectionClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-dataprotection/1.1.0`;
const packageDetails = `azsdk-js-arm-dataprotection/2.0.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand Down Expand Up @@ -141,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-01-01";
this.apiVersion = options.apiVersion || "2023-05-01";
this.backupVaults = new BackupVaultsImpl(this);
this.operationResult = new OperationResultImpl(this);
this.operationStatus = new OperationStatusImpl(this);
Expand Down
Loading

0 comments on commit d2f4d8e

Please sign in to comment.