/** @packageDocumentation
* @module AzCopy
*/
///
import { EventEmitter } from "events";
/** Integerity check constraint
* @internal
*/
export declare type MD5Options = "NoCheck" | "LogOnly" | "FailIfDifferent" | "FailIfDifferentOrMissing";
/** Log level for azcopy. Default to INFO
* @internal
*/
export declare type LogLevel = "INFO" | "WARNING" | "ERROR";
/** Copy option taken by 'azcopy copy' command
* @internal
*/
export interface CopyOptions {
blobType?: string;
blockBlobTier?: string;
blockSizeMb?: number;
checkMD5?: MD5Options;
contentEncoding?: string;
contentType?: string;
followSymLinks?: boolean;
logLevel?: LogLevel;
noGuessMimeType?: boolean;
preserveLastModifiedTime?: boolean;
putMD5?: boolean;
recursive?: boolean;
overwrite?: boolean;
}
/** Allow configuring azure stack variables
* @internal
*/
export interface Configuration {
concurrencyValue?: number;
logLocation?: string;
showPerfStates?: boolean;
pacePageBlobs?: boolean;
defaultServiceApiVersion?: string;
}
/** Describe message type
* @internal
*/
export declare type MessageType = "Init" | "Info" | "Progress" | "Exit" | "Error" | "Prompt";
/** Base interface for az events
* @internal
*/
export interface MessageEventArgs {
TimeStamp: string;
MessageType: MessageType;
}
/** Base class for event args
* @internal
*/
export interface StringEventArgs extends MessageEventArgs {
MessageContent: string;
}
/** Args for azinit event
* @internal
*/
export interface InitEventArgs extends MessageEventArgs {
LogFileLocation: string;
JobID: string;
}
/** Args for azprogress and azexit events
* @internal
*/
export interface ProgressEventArgs extends MessageEventArgs {
ErrorMsg: string;
ActiveConnections: number;
CompleteJobOrdered: boolean;
JobStatus: string;
TotalTransfers: number;
TransfersCompleted: number;
TransfersFailed: number;
TransfersSkipped: number;
BytesOverWire: number;
TotalBytesTransferred: number;
TotalBytesEnumerated: number;
FailedTransfers: any[];
SkippedTransfers?: any;
PerfConstraint: number;
}
/** Declare typed events
* @internal
*/
export declare interface AzCopy {
on(event: "azinit", listener: (args: InitEventArgs) => void): this;
on(event: "azinfo" | "azerror", listener: (args: StringEventArgs) => void): this;
on(event: "azprogress" | "azexit", listener: (args: ProgressEventArgs) => void): this;
on(event: "azruntimeerror", listener: (args: string) => void): this;
}
/**
* Wrapper to allow launch azcopy and listen to events.
* @internal
*/
export declare class AzCopy extends EventEmitter {
config: Configuration;
private static _resolvedExecPath?;
private static _minimumAzCopyVersionSupported;
private static _currentAzCopyVersion?;
/** Attempt to initialize azcopy utility class */
private static init;
/**
* Constructor for AzCopy utility
* @param config configure azure stack variables
*/
constructor(config?: Configuration);
/** check if azcopy has been configured and also initialize it. */
static get isAvailable(): boolean;
/** Return path to azopy image if configured */
static get execPath(): string;
/** Return binary version of configured azcopy */
static getVersion(): string;
/**
* Allow copy blob/files from and to azure storage. It can also copy between azure storage.
* @param source Source for azcopy. For more read azcopy docs.
* @param dest Destination for azcopy. For more read azcopy docs.
* @param options Options for copy.
*/
copy(source: string, dest: string, options?: CopyOptions): Promise;
}
//# sourceMappingURL=AzCopy.d.ts.map