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
12 changes: 6 additions & 6 deletions sdk/recoveryservicesbackup/arm-recoveryservicesbackup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-recoveryservicesbackup

### How to use

#### nodejs - Authentication, client creation and get privateEndpointConnection as an example written in TypeScript.
#### nodejs - Authentication, client creation and getOperationStatus as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -37,8 +37,8 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new RecoveryServicesBackupClient(creds, subscriptionId);
const vaultName = "testvaultName";
const resourceGroupName = "testresourceGroupName";
const privateEndpointConnectionName = "testprivateEndpointConnectionName";
client.privateEndpointConnection.get(vaultName, resourceGroupName, privateEndpointConnectionName).then((result) => {
const operationId = "testoperationId";
client.getOperationStatus(vaultName, resourceGroupName, operationId).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -47,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and get privateEndpointConnection as an example written in JavaScript.
#### browser - Authentication, client creation and getOperationStatus as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

Expand Down Expand Up @@ -83,8 +83,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
const client = new Azure.ArmRecoveryservicesbackup.RecoveryServicesBackupClient(res.creds, subscriptionId);
const vaultName = "testvaultName";
const resourceGroupName = "testresourceGroupName";
const privateEndpointConnectionName = "testprivateEndpointConnectionName";
client.privateEndpointConnection.get(vaultName, resourceGroupName, privateEndpointConnectionName).then((result) => {
const operationId = "testoperationId";
client.getOperationStatus(vaultName, resourceGroupName, operationId).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
discriminators,
ErrorAdditionalInfo,
NewErrorResponse,
NewErrorResponseError,
PrepareDataMoveResponse,
VaultStorageConfigOperationResultResponse
} from "../models/mappers";
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,153 @@ import * as msRest from "@azure/ms-rest-js";

export { BaseResource, CloudError };

/**
* The resource management error additional info.
*/
export interface ErrorAdditionalInfo {
/**
* The additional info type.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
/**
* The additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly info?: any;
}

/**
* The error object.
*/
export interface NewErrorResponseError {
/**
* The error code.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly code?: string;
/**
* The error message.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly message?: string;
/**
* The error target.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly target?: string;
/**
* The error details.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly details?: NewErrorResponse[];
/**
* The error additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly additionalInfo?: ErrorAdditionalInfo[];
}

/**
* The resource management error response.
*/
export interface NewErrorResponse {
/**
* The error object.
*/
error?: NewErrorResponseError;
}

/**
* Contains the possible cases for VaultStorageConfigOperationResultResponse.
*/
export type VaultStorageConfigOperationResultResponseUnion = VaultStorageConfigOperationResultResponse | PrepareDataMoveResponse;

/**
* Operation result response for Vault Storage Config
*/
export interface VaultStorageConfigOperationResultResponse {
/**
* Polymorphic Discriminator
*/
objectType: "VaultStorageConfigOperationResultResponse";
}

/**
* Prepare DataMove Request
*/
export interface PrepareDataMoveRequest {
/**
* ARM Id of target vault
*/
targetResourceId: string;
/**
* Target Region
*/
targetRegion: string;
/**
* DataMove Level. Possible values include: 'Invalid', 'Vault', 'Container'
*/
dataMoveLevel: DataMoveLevel;
/**
* Source Container ArmIds
* This needs to be populated only if DataMoveLevel is set to container
*/
sourceContainerArmIds?: string[];
/**
* Ignore the artifacts which are already moved.
*/
ignoreMoved?: boolean;
}

/**
* Prepare DataMove Response
*/
export interface PrepareDataMoveResponse {
/**
* Polymorphic Discriminator
*/
objectType: "PrepareDataMoveResponse";
/**
* Co-relationId for move operation
*/
correlationId?: string;
/**
* Source Vault Properties
*/
sourceVaultProperties?: { [propertyName: string]: string };
}

/**
* Trigger DataMove Request
*/
export interface TriggerDataMoveRequest {
/**
* ARM Id of source vault
*/
sourceResourceId: string;
/**
* Source Region
*/
sourceRegion: string;
/**
* DataMove Level. Possible values include: 'Invalid', 'Vault', 'Container'
*/
dataMoveLevel: DataMoveLevel;
/**
* Correlation Id
*/
correlationId: string;
/**
* Source Container ArmIds
*/
sourceContainerArmIds?: string[];
/**
* Pause GC
*/
pauseGC?: boolean;
}

/**
* Error information associated with operation status call.
*/
Expand Down Expand Up @@ -166,22 +313,6 @@ export interface PrivateEndpointConnectionResource extends Resource {
properties?: PrivateEndpointConnection;
}

/**
* The resource management error additional info.
*/
export interface ErrorAdditionalInfo {
/**
* The additional info type.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
/**
* The additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly info?: any;
}

/**
* The resource management error response.
*/
Expand Down Expand Up @@ -7758,6 +7889,14 @@ export interface ClientDiscoveryResponse extends Array<ClientDiscoveryValueForSi
nextLink?: string;
}

/**
* Defines values for DataMoveLevel.
* Possible values include: 'Invalid', 'Vault', 'Container'
* @readonly
* @enum {string}
*/
export type DataMoveLevel = 'Invalid' | 'Vault' | 'Container';

/**
* Defines values for OperationStatusValues.
* Possible values include: 'Invalid', 'InProgress', 'Succeeded', 'Failed', 'Canceled'
Expand Down Expand Up @@ -8224,10 +8363,50 @@ export type ContainerType = 'Invalid' | 'Unknown' | 'IaasVMContainer' | 'IaasVMS
*/
export type BackupItemType = 'Invalid' | 'VM' | 'FileFolder' | 'AzureSqlDb' | 'SQLDB' | 'Exchange' | 'Sharepoint' | 'VMwareVM' | 'SystemState' | 'Client' | 'GenericDataSource' | 'SQLDataBase' | 'AzureFileShare' | 'SAPHanaDatabase' | 'SAPAseDatabase';

/**
* Contains response data for the getOperationStatus operation.
*/
export type GetOperationStatusResponse = OperationStatus & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: OperationStatus;
};
};

/**
* Contains response data for the getOperationStatus1 operation.
*/
export type GetOperationStatus1Response = OperationStatus & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: OperationStatus;
};
};

/**
* Contains response data for the get operation.
*/
export type PrivateEndpointConnectionGetResponse = PrivateEndpointConnectionResource & {
export type BMSPrepareDataMoveOperationResultGetResponse = VaultStorageConfigOperationResultResponseUnion & {
/**
* The underlying HTTP response.
*/
Expand All @@ -8240,14 +8419,34 @@ export type PrivateEndpointConnectionGetResponse = PrivateEndpointConnectionReso
/**
* The response body as parsed JSON or XML
*/
parsedBody: PrivateEndpointConnectionResource;
parsedBody: VaultStorageConfigOperationResultResponseUnion;
};
};

/**
* Contains response data for the put operation.
* Contains response data for the beginGet operation.
*/
export type PrivateEndpointConnectionPutResponse = PrivateEndpointConnectionResource & {
export type BMSPrepareDataMoveOperationResultBeginGetResponse = VaultStorageConfigOperationResultResponseUnion & {
/**
* The underlying HTTP response.
*/
_response: msRest.HttpResponse & {
/**
* The response body as text (string format)
*/
bodyAsText: string;

/**
* The response body as parsed JSON or XML
*/
parsedBody: VaultStorageConfigOperationResultResponseUnion;
};
};

/**
* Contains response data for the get operation.
*/
export type PrivateEndpointConnectionGetResponse = PrivateEndpointConnectionResource & {
/**
* The underlying HTTP response.
*/
Expand All @@ -8265,9 +8464,9 @@ export type PrivateEndpointConnectionPutResponse = PrivateEndpointConnectionReso
};

/**
* Contains response data for the beginPut operation.
* Contains response data for the put operation.
*/
export type PrivateEndpointConnectionBeginPutResponse = PrivateEndpointConnectionResource & {
export type PrivateEndpointConnectionPutResponse = PrivateEndpointConnectionResource & {
/**
* The underlying HTTP response.
*/
Expand All @@ -8285,9 +8484,9 @@ export type PrivateEndpointConnectionBeginPutResponse = PrivateEndpointConnectio
};

/**
* Contains response data for the getOperationStatus operation.
* Contains response data for the beginPut operation.
*/
export type GetOperationStatusResponse = OperationStatus & {
export type PrivateEndpointConnectionBeginPutResponse = PrivateEndpointConnectionResource & {
/**
* The underlying HTTP response.
*/
Expand All @@ -8300,7 +8499,7 @@ export type GetOperationStatusResponse = OperationStatus & {
/**
* The response body as parsed JSON or XML
*/
parsedBody: OperationStatus;
parsedBody: PrivateEndpointConnectionResource;
};
};

Expand Down
Loading