/clients/client-datasync/DataSync.ts

https://github.com/aws/aws-sdk-js-v3 · TypeScript · 1133 lines · 934 code · 31 blank · 168 comment · 341 complexity · 73dfeff411938ba150ba56a8b4b58d96 MD5 · raw file

  1. import { DataSyncClient } from "./DataSyncClient";
  2. import {
  3. CancelTaskExecutionCommand,
  4. CancelTaskExecutionCommandInput,
  5. CancelTaskExecutionCommandOutput,
  6. } from "./commands/CancelTaskExecutionCommand";
  7. import { CreateAgentCommand, CreateAgentCommandInput, CreateAgentCommandOutput } from "./commands/CreateAgentCommand";
  8. import {
  9. CreateLocationEfsCommand,
  10. CreateLocationEfsCommandInput,
  11. CreateLocationEfsCommandOutput,
  12. } from "./commands/CreateLocationEfsCommand";
  13. import {
  14. CreateLocationFsxWindowsCommand,
  15. CreateLocationFsxWindowsCommandInput,
  16. CreateLocationFsxWindowsCommandOutput,
  17. } from "./commands/CreateLocationFsxWindowsCommand";
  18. import {
  19. CreateLocationNfsCommand,
  20. CreateLocationNfsCommandInput,
  21. CreateLocationNfsCommandOutput,
  22. } from "./commands/CreateLocationNfsCommand";
  23. import {
  24. CreateLocationObjectStorageCommand,
  25. CreateLocationObjectStorageCommandInput,
  26. CreateLocationObjectStorageCommandOutput,
  27. } from "./commands/CreateLocationObjectStorageCommand";
  28. import {
  29. CreateLocationS3Command,
  30. CreateLocationS3CommandInput,
  31. CreateLocationS3CommandOutput,
  32. } from "./commands/CreateLocationS3Command";
  33. import {
  34. CreateLocationSmbCommand,
  35. CreateLocationSmbCommandInput,
  36. CreateLocationSmbCommandOutput,
  37. } from "./commands/CreateLocationSmbCommand";
  38. import { CreateTaskCommand, CreateTaskCommandInput, CreateTaskCommandOutput } from "./commands/CreateTaskCommand";
  39. import { DeleteAgentCommand, DeleteAgentCommandInput, DeleteAgentCommandOutput } from "./commands/DeleteAgentCommand";
  40. import {
  41. DeleteLocationCommand,
  42. DeleteLocationCommandInput,
  43. DeleteLocationCommandOutput,
  44. } from "./commands/DeleteLocationCommand";
  45. import { DeleteTaskCommand, DeleteTaskCommandInput, DeleteTaskCommandOutput } from "./commands/DeleteTaskCommand";
  46. import {
  47. DescribeAgentCommand,
  48. DescribeAgentCommandInput,
  49. DescribeAgentCommandOutput,
  50. } from "./commands/DescribeAgentCommand";
  51. import {
  52. DescribeLocationEfsCommand,
  53. DescribeLocationEfsCommandInput,
  54. DescribeLocationEfsCommandOutput,
  55. } from "./commands/DescribeLocationEfsCommand";
  56. import {
  57. DescribeLocationFsxWindowsCommand,
  58. DescribeLocationFsxWindowsCommandInput,
  59. DescribeLocationFsxWindowsCommandOutput,
  60. } from "./commands/DescribeLocationFsxWindowsCommand";
  61. import {
  62. DescribeLocationNfsCommand,
  63. DescribeLocationNfsCommandInput,
  64. DescribeLocationNfsCommandOutput,
  65. } from "./commands/DescribeLocationNfsCommand";
  66. import {
  67. DescribeLocationObjectStorageCommand,
  68. DescribeLocationObjectStorageCommandInput,
  69. DescribeLocationObjectStorageCommandOutput,
  70. } from "./commands/DescribeLocationObjectStorageCommand";
  71. import {
  72. DescribeLocationS3Command,
  73. DescribeLocationS3CommandInput,
  74. DescribeLocationS3CommandOutput,
  75. } from "./commands/DescribeLocationS3Command";
  76. import {
  77. DescribeLocationSmbCommand,
  78. DescribeLocationSmbCommandInput,
  79. DescribeLocationSmbCommandOutput,
  80. } from "./commands/DescribeLocationSmbCommand";
  81. import {
  82. DescribeTaskCommand,
  83. DescribeTaskCommandInput,
  84. DescribeTaskCommandOutput,
  85. } from "./commands/DescribeTaskCommand";
  86. import {
  87. DescribeTaskExecutionCommand,
  88. DescribeTaskExecutionCommandInput,
  89. DescribeTaskExecutionCommandOutput,
  90. } from "./commands/DescribeTaskExecutionCommand";
  91. import { ListAgentsCommand, ListAgentsCommandInput, ListAgentsCommandOutput } from "./commands/ListAgentsCommand";
  92. import {
  93. ListLocationsCommand,
  94. ListLocationsCommandInput,
  95. ListLocationsCommandOutput,
  96. } from "./commands/ListLocationsCommand";
  97. import {
  98. ListTagsForResourceCommand,
  99. ListTagsForResourceCommandInput,
  100. ListTagsForResourceCommandOutput,
  101. } from "./commands/ListTagsForResourceCommand";
  102. import {
  103. ListTaskExecutionsCommand,
  104. ListTaskExecutionsCommandInput,
  105. ListTaskExecutionsCommandOutput,
  106. } from "./commands/ListTaskExecutionsCommand";
  107. import { ListTasksCommand, ListTasksCommandInput, ListTasksCommandOutput } from "./commands/ListTasksCommand";
  108. import {
  109. StartTaskExecutionCommand,
  110. StartTaskExecutionCommandInput,
  111. StartTaskExecutionCommandOutput,
  112. } from "./commands/StartTaskExecutionCommand";
  113. import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
  114. import {
  115. UntagResourceCommand,
  116. UntagResourceCommandInput,
  117. UntagResourceCommandOutput,
  118. } from "./commands/UntagResourceCommand";
  119. import { UpdateAgentCommand, UpdateAgentCommandInput, UpdateAgentCommandOutput } from "./commands/UpdateAgentCommand";
  120. import { UpdateTaskCommand, UpdateTaskCommandInput, UpdateTaskCommandOutput } from "./commands/UpdateTaskCommand";
  121. import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
  122. /**
  123. * <fullname>AWS DataSync</fullname>
  124. *
  125. * <p>AWS DataSync is a managed data transfer service that makes it simpler for you to
  126. * automate moving data between on-premises storage and Amazon Simple Storage Service (Amazon S3)
  127. * or Amazon Elastic File System (Amazon EFS). </p>
  128. * <p>This API interface reference for AWS DataSync contains documentation for a
  129. * programming interface that you can use to manage AWS DataSync.</p>
  130. */
  131. export class DataSync extends DataSyncClient {
  132. /**
  133. * <p>Cancels execution of a task. </p>
  134. * <p>When you cancel a task execution, the transfer of some files is abruptly interrupted.
  135. * The contents of files that are transferred to the destination might be incomplete or
  136. * inconsistent with the source files. However, if you start a new task execution on the same
  137. * task and you allow the task execution to complete, file content on the destination is complete
  138. * and consistent. This applies to other unexpected failures that interrupt a task execution. In
  139. * all of these cases, AWS DataSync successfully complete the transfer when you start the next
  140. * task execution.</p>
  141. */
  142. public cancelTaskExecution(
  143. args: CancelTaskExecutionCommandInput,
  144. options?: __HttpHandlerOptions
  145. ): Promise<CancelTaskExecutionCommandOutput>;
  146. public cancelTaskExecution(
  147. args: CancelTaskExecutionCommandInput,
  148. cb: (err: any, data?: CancelTaskExecutionCommandOutput) => void
  149. ): void;
  150. public cancelTaskExecution(
  151. args: CancelTaskExecutionCommandInput,
  152. options: __HttpHandlerOptions,
  153. cb: (err: any, data?: CancelTaskExecutionCommandOutput) => void
  154. ): void;
  155. public cancelTaskExecution(
  156. args: CancelTaskExecutionCommandInput,
  157. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CancelTaskExecutionCommandOutput) => void),
  158. cb?: (err: any, data?: CancelTaskExecutionCommandOutput) => void
  159. ): Promise<CancelTaskExecutionCommandOutput> | void {
  160. const command = new CancelTaskExecutionCommand(args);
  161. if (typeof optionsOrCb === "function") {
  162. this.send(command, optionsOrCb);
  163. } else if (typeof cb === "function") {
  164. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  165. this.send(command, optionsOrCb || {}, cb);
  166. } else {
  167. return this.send(command, optionsOrCb);
  168. }
  169. }
  170. /**
  171. * <p>Activates an AWS DataSync agent that you have deployed on your host. The activation
  172. * process associates your agent with your account. In the activation process, you specify
  173. * information such as the AWS Region that you want to activate the agent in. You activate the
  174. * agent in the AWS Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your
  175. * tasks are created in this AWS Region.</p>
  176. * <p>You can activate the agent in a VPC (virtual private cloud) or provide the agent access to
  177. * a VPC endpoint so you can run tasks without going over the public Internet.</p>
  178. * <p>You can use an agent for more than one location. If a task uses multiple agents, all of
  179. * them need to have status AVAILABLE for the task to run. If you use multiple agents for a
  180. * source location, the status of all the agents must be AVAILABLE for the task to run. </p>
  181. *
  182. *
  183. * <p>Agents are automatically updated by AWS on a regular basis, using a mechanism that
  184. * ensures minimal interruption to your tasks.</p>
  185. * <p></p>
  186. */
  187. public createAgent(args: CreateAgentCommandInput, options?: __HttpHandlerOptions): Promise<CreateAgentCommandOutput>;
  188. public createAgent(args: CreateAgentCommandInput, cb: (err: any, data?: CreateAgentCommandOutput) => void): void;
  189. public createAgent(
  190. args: CreateAgentCommandInput,
  191. options: __HttpHandlerOptions,
  192. cb: (err: any, data?: CreateAgentCommandOutput) => void
  193. ): void;
  194. public createAgent(
  195. args: CreateAgentCommandInput,
  196. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateAgentCommandOutput) => void),
  197. cb?: (err: any, data?: CreateAgentCommandOutput) => void
  198. ): Promise<CreateAgentCommandOutput> | void {
  199. const command = new CreateAgentCommand(args);
  200. if (typeof optionsOrCb === "function") {
  201. this.send(command, optionsOrCb);
  202. } else if (typeof cb === "function") {
  203. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  204. this.send(command, optionsOrCb || {}, cb);
  205. } else {
  206. return this.send(command, optionsOrCb);
  207. }
  208. }
  209. /**
  210. * <p>Creates an endpoint for an Amazon EFS file system.</p>
  211. */
  212. public createLocationEfs(
  213. args: CreateLocationEfsCommandInput,
  214. options?: __HttpHandlerOptions
  215. ): Promise<CreateLocationEfsCommandOutput>;
  216. public createLocationEfs(
  217. args: CreateLocationEfsCommandInput,
  218. cb: (err: any, data?: CreateLocationEfsCommandOutput) => void
  219. ): void;
  220. public createLocationEfs(
  221. args: CreateLocationEfsCommandInput,
  222. options: __HttpHandlerOptions,
  223. cb: (err: any, data?: CreateLocationEfsCommandOutput) => void
  224. ): void;
  225. public createLocationEfs(
  226. args: CreateLocationEfsCommandInput,
  227. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationEfsCommandOutput) => void),
  228. cb?: (err: any, data?: CreateLocationEfsCommandOutput) => void
  229. ): Promise<CreateLocationEfsCommandOutput> | void {
  230. const command = new CreateLocationEfsCommand(args);
  231. if (typeof optionsOrCb === "function") {
  232. this.send(command, optionsOrCb);
  233. } else if (typeof cb === "function") {
  234. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  235. this.send(command, optionsOrCb || {}, cb);
  236. } else {
  237. return this.send(command, optionsOrCb);
  238. }
  239. }
  240. /**
  241. * <p>Creates an endpoint for an Amazon FSx for Windows file system.</p>
  242. */
  243. public createLocationFsxWindows(
  244. args: CreateLocationFsxWindowsCommandInput,
  245. options?: __HttpHandlerOptions
  246. ): Promise<CreateLocationFsxWindowsCommandOutput>;
  247. public createLocationFsxWindows(
  248. args: CreateLocationFsxWindowsCommandInput,
  249. cb: (err: any, data?: CreateLocationFsxWindowsCommandOutput) => void
  250. ): void;
  251. public createLocationFsxWindows(
  252. args: CreateLocationFsxWindowsCommandInput,
  253. options: __HttpHandlerOptions,
  254. cb: (err: any, data?: CreateLocationFsxWindowsCommandOutput) => void
  255. ): void;
  256. public createLocationFsxWindows(
  257. args: CreateLocationFsxWindowsCommandInput,
  258. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationFsxWindowsCommandOutput) => void),
  259. cb?: (err: any, data?: CreateLocationFsxWindowsCommandOutput) => void
  260. ): Promise<CreateLocationFsxWindowsCommandOutput> | void {
  261. const command = new CreateLocationFsxWindowsCommand(args);
  262. if (typeof optionsOrCb === "function") {
  263. this.send(command, optionsOrCb);
  264. } else if (typeof cb === "function") {
  265. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  266. this.send(command, optionsOrCb || {}, cb);
  267. } else {
  268. return this.send(command, optionsOrCb);
  269. }
  270. }
  271. /**
  272. * <p>Defines a file system on a Network File System (NFS) server that can be read from or
  273. * written to.</p>
  274. */
  275. public createLocationNfs(
  276. args: CreateLocationNfsCommandInput,
  277. options?: __HttpHandlerOptions
  278. ): Promise<CreateLocationNfsCommandOutput>;
  279. public createLocationNfs(
  280. args: CreateLocationNfsCommandInput,
  281. cb: (err: any, data?: CreateLocationNfsCommandOutput) => void
  282. ): void;
  283. public createLocationNfs(
  284. args: CreateLocationNfsCommandInput,
  285. options: __HttpHandlerOptions,
  286. cb: (err: any, data?: CreateLocationNfsCommandOutput) => void
  287. ): void;
  288. public createLocationNfs(
  289. args: CreateLocationNfsCommandInput,
  290. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationNfsCommandOutput) => void),
  291. cb?: (err: any, data?: CreateLocationNfsCommandOutput) => void
  292. ): Promise<CreateLocationNfsCommandOutput> | void {
  293. const command = new CreateLocationNfsCommand(args);
  294. if (typeof optionsOrCb === "function") {
  295. this.send(command, optionsOrCb);
  296. } else if (typeof cb === "function") {
  297. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  298. this.send(command, optionsOrCb || {}, cb);
  299. } else {
  300. return this.send(command, optionsOrCb);
  301. }
  302. }
  303. /**
  304. * <p>Creates an endpoint for a self-managed object storage bucket.</p>
  305. */
  306. public createLocationObjectStorage(
  307. args: CreateLocationObjectStorageCommandInput,
  308. options?: __HttpHandlerOptions
  309. ): Promise<CreateLocationObjectStorageCommandOutput>;
  310. public createLocationObjectStorage(
  311. args: CreateLocationObjectStorageCommandInput,
  312. cb: (err: any, data?: CreateLocationObjectStorageCommandOutput) => void
  313. ): void;
  314. public createLocationObjectStorage(
  315. args: CreateLocationObjectStorageCommandInput,
  316. options: __HttpHandlerOptions,
  317. cb: (err: any, data?: CreateLocationObjectStorageCommandOutput) => void
  318. ): void;
  319. public createLocationObjectStorage(
  320. args: CreateLocationObjectStorageCommandInput,
  321. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationObjectStorageCommandOutput) => void),
  322. cb?: (err: any, data?: CreateLocationObjectStorageCommandOutput) => void
  323. ): Promise<CreateLocationObjectStorageCommandOutput> | void {
  324. const command = new CreateLocationObjectStorageCommand(args);
  325. if (typeof optionsOrCb === "function") {
  326. this.send(command, optionsOrCb);
  327. } else if (typeof cb === "function") {
  328. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  329. this.send(command, optionsOrCb || {}, cb);
  330. } else {
  331. return this.send(command, optionsOrCb);
  332. }
  333. }
  334. /**
  335. * <p>Creates an endpoint for an Amazon S3 bucket.</p>
  336. * <p>For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity and Access
  337. * Management (IAM) role that has the required permissions. You can set up the required
  338. * permissions by creating an IAM policy that grants the required permissions and attaching the
  339. * policy to the role. An example of such a policy is shown in the examples section.</p>
  340. *
  341. *
  342. * <p>For more information, see https://docs.aws.amazon.com/datasync/latest/userguide/working-with-locations.html#create-s3-location in the
  343. * <i>AWS DataSync User Guide.</i>
  344. * </p>
  345. */
  346. public createLocationS3(
  347. args: CreateLocationS3CommandInput,
  348. options?: __HttpHandlerOptions
  349. ): Promise<CreateLocationS3CommandOutput>;
  350. public createLocationS3(
  351. args: CreateLocationS3CommandInput,
  352. cb: (err: any, data?: CreateLocationS3CommandOutput) => void
  353. ): void;
  354. public createLocationS3(
  355. args: CreateLocationS3CommandInput,
  356. options: __HttpHandlerOptions,
  357. cb: (err: any, data?: CreateLocationS3CommandOutput) => void
  358. ): void;
  359. public createLocationS3(
  360. args: CreateLocationS3CommandInput,
  361. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationS3CommandOutput) => void),
  362. cb?: (err: any, data?: CreateLocationS3CommandOutput) => void
  363. ): Promise<CreateLocationS3CommandOutput> | void {
  364. const command = new CreateLocationS3Command(args);
  365. if (typeof optionsOrCb === "function") {
  366. this.send(command, optionsOrCb);
  367. } else if (typeof cb === "function") {
  368. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  369. this.send(command, optionsOrCb || {}, cb);
  370. } else {
  371. return this.send(command, optionsOrCb);
  372. }
  373. }
  374. /**
  375. * <p>Defines a file system on a Server Message Block (SMB) server that can be read from or
  376. * written to.</p>
  377. */
  378. public createLocationSmb(
  379. args: CreateLocationSmbCommandInput,
  380. options?: __HttpHandlerOptions
  381. ): Promise<CreateLocationSmbCommandOutput>;
  382. public createLocationSmb(
  383. args: CreateLocationSmbCommandInput,
  384. cb: (err: any, data?: CreateLocationSmbCommandOutput) => void
  385. ): void;
  386. public createLocationSmb(
  387. args: CreateLocationSmbCommandInput,
  388. options: __HttpHandlerOptions,
  389. cb: (err: any, data?: CreateLocationSmbCommandOutput) => void
  390. ): void;
  391. public createLocationSmb(
  392. args: CreateLocationSmbCommandInput,
  393. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateLocationSmbCommandOutput) => void),
  394. cb?: (err: any, data?: CreateLocationSmbCommandOutput) => void
  395. ): Promise<CreateLocationSmbCommandOutput> | void {
  396. const command = new CreateLocationSmbCommand(args);
  397. if (typeof optionsOrCb === "function") {
  398. this.send(command, optionsOrCb);
  399. } else if (typeof cb === "function") {
  400. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  401. this.send(command, optionsOrCb || {}, cb);
  402. } else {
  403. return this.send(command, optionsOrCb);
  404. }
  405. }
  406. /**
  407. * <p>Creates a task. A task is a set of two locations (source and destination) and a set of
  408. * Options that you use to control the behavior of a task. If you don't specify Options when you
  409. * create a task, AWS DataSync populates them with service defaults.</p>
  410. * <p>When you create a task, it first enters the CREATING state. During CREATING
  411. * AWS DataSync attempts to mount the on-premises Network File System (NFS) location. The task
  412. * transitions to the AVAILABLE state without waiting for the AWS location to become mounted. If
  413. * required, AWS DataSync mounts the AWS location before each task execution.</p>
  414. * <p>If an agent that is associated with a source (NFS) location goes offline, the task
  415. * transitions to the UNAVAILABLE status. If the status of the task remains in the CREATING
  416. * status for more than a few minutes, it means that your agent might be having trouble mounting
  417. * the source NFS file system. Check the task's ErrorCode and ErrorDetail. Mount issues are often
  418. * caused by either a misconfigured firewall or a mistyped NFS server host name.</p>
  419. */
  420. public createTask(args: CreateTaskCommandInput, options?: __HttpHandlerOptions): Promise<CreateTaskCommandOutput>;
  421. public createTask(args: CreateTaskCommandInput, cb: (err: any, data?: CreateTaskCommandOutput) => void): void;
  422. public createTask(
  423. args: CreateTaskCommandInput,
  424. options: __HttpHandlerOptions,
  425. cb: (err: any, data?: CreateTaskCommandOutput) => void
  426. ): void;
  427. public createTask(
  428. args: CreateTaskCommandInput,
  429. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: CreateTaskCommandOutput) => void),
  430. cb?: (err: any, data?: CreateTaskCommandOutput) => void
  431. ): Promise<CreateTaskCommandOutput> | void {
  432. const command = new CreateTaskCommand(args);
  433. if (typeof optionsOrCb === "function") {
  434. this.send(command, optionsOrCb);
  435. } else if (typeof cb === "function") {
  436. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  437. this.send(command, optionsOrCb || {}, cb);
  438. } else {
  439. return this.send(command, optionsOrCb);
  440. }
  441. }
  442. /**
  443. * <p>Deletes an agent. To specify which agent to delete, use the Amazon Resource Name (ARN)
  444. * of the agent in your request. The operation disassociates the agent from your AWS account.
  445. * However, it doesn't delete the agent virtual machine (VM) from your on-premises
  446. * environment.</p>
  447. */
  448. public deleteAgent(args: DeleteAgentCommandInput, options?: __HttpHandlerOptions): Promise<DeleteAgentCommandOutput>;
  449. public deleteAgent(args: DeleteAgentCommandInput, cb: (err: any, data?: DeleteAgentCommandOutput) => void): void;
  450. public deleteAgent(
  451. args: DeleteAgentCommandInput,
  452. options: __HttpHandlerOptions,
  453. cb: (err: any, data?: DeleteAgentCommandOutput) => void
  454. ): void;
  455. public deleteAgent(
  456. args: DeleteAgentCommandInput,
  457. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteAgentCommandOutput) => void),
  458. cb?: (err: any, data?: DeleteAgentCommandOutput) => void
  459. ): Promise<DeleteAgentCommandOutput> | void {
  460. const command = new DeleteAgentCommand(args);
  461. if (typeof optionsOrCb === "function") {
  462. this.send(command, optionsOrCb);
  463. } else if (typeof cb === "function") {
  464. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  465. this.send(command, optionsOrCb || {}, cb);
  466. } else {
  467. return this.send(command, optionsOrCb);
  468. }
  469. }
  470. /**
  471. * <p>Deletes the configuration of a location used by AWS DataSync. </p>
  472. */
  473. public deleteLocation(
  474. args: DeleteLocationCommandInput,
  475. options?: __HttpHandlerOptions
  476. ): Promise<DeleteLocationCommandOutput>;
  477. public deleteLocation(
  478. args: DeleteLocationCommandInput,
  479. cb: (err: any, data?: DeleteLocationCommandOutput) => void
  480. ): void;
  481. public deleteLocation(
  482. args: DeleteLocationCommandInput,
  483. options: __HttpHandlerOptions,
  484. cb: (err: any, data?: DeleteLocationCommandOutput) => void
  485. ): void;
  486. public deleteLocation(
  487. args: DeleteLocationCommandInput,
  488. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteLocationCommandOutput) => void),
  489. cb?: (err: any, data?: DeleteLocationCommandOutput) => void
  490. ): Promise<DeleteLocationCommandOutput> | void {
  491. const command = new DeleteLocationCommand(args);
  492. if (typeof optionsOrCb === "function") {
  493. this.send(command, optionsOrCb);
  494. } else if (typeof cb === "function") {
  495. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  496. this.send(command, optionsOrCb || {}, cb);
  497. } else {
  498. return this.send(command, optionsOrCb);
  499. }
  500. }
  501. /**
  502. * <p>Deletes a task.</p>
  503. */
  504. public deleteTask(args: DeleteTaskCommandInput, options?: __HttpHandlerOptions): Promise<DeleteTaskCommandOutput>;
  505. public deleteTask(args: DeleteTaskCommandInput, cb: (err: any, data?: DeleteTaskCommandOutput) => void): void;
  506. public deleteTask(
  507. args: DeleteTaskCommandInput,
  508. options: __HttpHandlerOptions,
  509. cb: (err: any, data?: DeleteTaskCommandOutput) => void
  510. ): void;
  511. public deleteTask(
  512. args: DeleteTaskCommandInput,
  513. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DeleteTaskCommandOutput) => void),
  514. cb?: (err: any, data?: DeleteTaskCommandOutput) => void
  515. ): Promise<DeleteTaskCommandOutput> | void {
  516. const command = new DeleteTaskCommand(args);
  517. if (typeof optionsOrCb === "function") {
  518. this.send(command, optionsOrCb);
  519. } else if (typeof cb === "function") {
  520. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  521. this.send(command, optionsOrCb || {}, cb);
  522. } else {
  523. return this.send(command, optionsOrCb);
  524. }
  525. }
  526. /**
  527. * <p>Returns metadata such as the name, the network interfaces, and the status (that is,
  528. * whether the agent is running or not) for an agent. To specify which agent to describe, use the
  529. * Amazon Resource Name (ARN) of the agent in your request. </p>
  530. */
  531. public describeAgent(
  532. args: DescribeAgentCommandInput,
  533. options?: __HttpHandlerOptions
  534. ): Promise<DescribeAgentCommandOutput>;
  535. public describeAgent(
  536. args: DescribeAgentCommandInput,
  537. cb: (err: any, data?: DescribeAgentCommandOutput) => void
  538. ): void;
  539. public describeAgent(
  540. args: DescribeAgentCommandInput,
  541. options: __HttpHandlerOptions,
  542. cb: (err: any, data?: DescribeAgentCommandOutput) => void
  543. ): void;
  544. public describeAgent(
  545. args: DescribeAgentCommandInput,
  546. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeAgentCommandOutput) => void),
  547. cb?: (err: any, data?: DescribeAgentCommandOutput) => void
  548. ): Promise<DescribeAgentCommandOutput> | void {
  549. const command = new DescribeAgentCommand(args);
  550. if (typeof optionsOrCb === "function") {
  551. this.send(command, optionsOrCb);
  552. } else if (typeof cb === "function") {
  553. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  554. this.send(command, optionsOrCb || {}, cb);
  555. } else {
  556. return this.send(command, optionsOrCb);
  557. }
  558. }
  559. /**
  560. * <p>Returns metadata, such as the path information about an Amazon EFS location.</p>
  561. */
  562. public describeLocationEfs(
  563. args: DescribeLocationEfsCommandInput,
  564. options?: __HttpHandlerOptions
  565. ): Promise<DescribeLocationEfsCommandOutput>;
  566. public describeLocationEfs(
  567. args: DescribeLocationEfsCommandInput,
  568. cb: (err: any, data?: DescribeLocationEfsCommandOutput) => void
  569. ): void;
  570. public describeLocationEfs(
  571. args: DescribeLocationEfsCommandInput,
  572. options: __HttpHandlerOptions,
  573. cb: (err: any, data?: DescribeLocationEfsCommandOutput) => void
  574. ): void;
  575. public describeLocationEfs(
  576. args: DescribeLocationEfsCommandInput,
  577. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationEfsCommandOutput) => void),
  578. cb?: (err: any, data?: DescribeLocationEfsCommandOutput) => void
  579. ): Promise<DescribeLocationEfsCommandOutput> | void {
  580. const command = new DescribeLocationEfsCommand(args);
  581. if (typeof optionsOrCb === "function") {
  582. this.send(command, optionsOrCb);
  583. } else if (typeof cb === "function") {
  584. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  585. this.send(command, optionsOrCb || {}, cb);
  586. } else {
  587. return this.send(command, optionsOrCb);
  588. }
  589. }
  590. /**
  591. * <p>Returns metadata, such as the path information about an Amazon FSx for Windows location.</p>
  592. */
  593. public describeLocationFsxWindows(
  594. args: DescribeLocationFsxWindowsCommandInput,
  595. options?: __HttpHandlerOptions
  596. ): Promise<DescribeLocationFsxWindowsCommandOutput>;
  597. public describeLocationFsxWindows(
  598. args: DescribeLocationFsxWindowsCommandInput,
  599. cb: (err: any, data?: DescribeLocationFsxWindowsCommandOutput) => void
  600. ): void;
  601. public describeLocationFsxWindows(
  602. args: DescribeLocationFsxWindowsCommandInput,
  603. options: __HttpHandlerOptions,
  604. cb: (err: any, data?: DescribeLocationFsxWindowsCommandOutput) => void
  605. ): void;
  606. public describeLocationFsxWindows(
  607. args: DescribeLocationFsxWindowsCommandInput,
  608. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationFsxWindowsCommandOutput) => void),
  609. cb?: (err: any, data?: DescribeLocationFsxWindowsCommandOutput) => void
  610. ): Promise<DescribeLocationFsxWindowsCommandOutput> | void {
  611. const command = new DescribeLocationFsxWindowsCommand(args);
  612. if (typeof optionsOrCb === "function") {
  613. this.send(command, optionsOrCb);
  614. } else if (typeof cb === "function") {
  615. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  616. this.send(command, optionsOrCb || {}, cb);
  617. } else {
  618. return this.send(command, optionsOrCb);
  619. }
  620. }
  621. /**
  622. * <p>Returns metadata, such as the path information, about an NFS location.</p>
  623. */
  624. public describeLocationNfs(
  625. args: DescribeLocationNfsCommandInput,
  626. options?: __HttpHandlerOptions
  627. ): Promise<DescribeLocationNfsCommandOutput>;
  628. public describeLocationNfs(
  629. args: DescribeLocationNfsCommandInput,
  630. cb: (err: any, data?: DescribeLocationNfsCommandOutput) => void
  631. ): void;
  632. public describeLocationNfs(
  633. args: DescribeLocationNfsCommandInput,
  634. options: __HttpHandlerOptions,
  635. cb: (err: any, data?: DescribeLocationNfsCommandOutput) => void
  636. ): void;
  637. public describeLocationNfs(
  638. args: DescribeLocationNfsCommandInput,
  639. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationNfsCommandOutput) => void),
  640. cb?: (err: any, data?: DescribeLocationNfsCommandOutput) => void
  641. ): Promise<DescribeLocationNfsCommandOutput> | void {
  642. const command = new DescribeLocationNfsCommand(args);
  643. if (typeof optionsOrCb === "function") {
  644. this.send(command, optionsOrCb);
  645. } else if (typeof cb === "function") {
  646. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  647. this.send(command, optionsOrCb || {}, cb);
  648. } else {
  649. return this.send(command, optionsOrCb);
  650. }
  651. }
  652. /**
  653. * <p>Returns metadata about a self-managed object storage server location.</p>
  654. */
  655. public describeLocationObjectStorage(
  656. args: DescribeLocationObjectStorageCommandInput,
  657. options?: __HttpHandlerOptions
  658. ): Promise<DescribeLocationObjectStorageCommandOutput>;
  659. public describeLocationObjectStorage(
  660. args: DescribeLocationObjectStorageCommandInput,
  661. cb: (err: any, data?: DescribeLocationObjectStorageCommandOutput) => void
  662. ): void;
  663. public describeLocationObjectStorage(
  664. args: DescribeLocationObjectStorageCommandInput,
  665. options: __HttpHandlerOptions,
  666. cb: (err: any, data?: DescribeLocationObjectStorageCommandOutput) => void
  667. ): void;
  668. public describeLocationObjectStorage(
  669. args: DescribeLocationObjectStorageCommandInput,
  670. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationObjectStorageCommandOutput) => void),
  671. cb?: (err: any, data?: DescribeLocationObjectStorageCommandOutput) => void
  672. ): Promise<DescribeLocationObjectStorageCommandOutput> | void {
  673. const command = new DescribeLocationObjectStorageCommand(args);
  674. if (typeof optionsOrCb === "function") {
  675. this.send(command, optionsOrCb);
  676. } else if (typeof cb === "function") {
  677. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  678. this.send(command, optionsOrCb || {}, cb);
  679. } else {
  680. return this.send(command, optionsOrCb);
  681. }
  682. }
  683. /**
  684. * <p>Returns metadata, such as bucket name, about an Amazon S3 bucket location.</p>
  685. */
  686. public describeLocationS3(
  687. args: DescribeLocationS3CommandInput,
  688. options?: __HttpHandlerOptions
  689. ): Promise<DescribeLocationS3CommandOutput>;
  690. public describeLocationS3(
  691. args: DescribeLocationS3CommandInput,
  692. cb: (err: any, data?: DescribeLocationS3CommandOutput) => void
  693. ): void;
  694. public describeLocationS3(
  695. args: DescribeLocationS3CommandInput,
  696. options: __HttpHandlerOptions,
  697. cb: (err: any, data?: DescribeLocationS3CommandOutput) => void
  698. ): void;
  699. public describeLocationS3(
  700. args: DescribeLocationS3CommandInput,
  701. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationS3CommandOutput) => void),
  702. cb?: (err: any, data?: DescribeLocationS3CommandOutput) => void
  703. ): Promise<DescribeLocationS3CommandOutput> | void {
  704. const command = new DescribeLocationS3Command(args);
  705. if (typeof optionsOrCb === "function") {
  706. this.send(command, optionsOrCb);
  707. } else if (typeof cb === "function") {
  708. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  709. this.send(command, optionsOrCb || {}, cb);
  710. } else {
  711. return this.send(command, optionsOrCb);
  712. }
  713. }
  714. /**
  715. * <p>Returns metadata, such as the path and user information about an SMB location.</p>
  716. */
  717. public describeLocationSmb(
  718. args: DescribeLocationSmbCommandInput,
  719. options?: __HttpHandlerOptions
  720. ): Promise<DescribeLocationSmbCommandOutput>;
  721. public describeLocationSmb(
  722. args: DescribeLocationSmbCommandInput,
  723. cb: (err: any, data?: DescribeLocationSmbCommandOutput) => void
  724. ): void;
  725. public describeLocationSmb(
  726. args: DescribeLocationSmbCommandInput,
  727. options: __HttpHandlerOptions,
  728. cb: (err: any, data?: DescribeLocationSmbCommandOutput) => void
  729. ): void;
  730. public describeLocationSmb(
  731. args: DescribeLocationSmbCommandInput,
  732. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeLocationSmbCommandOutput) => void),
  733. cb?: (err: any, data?: DescribeLocationSmbCommandOutput) => void
  734. ): Promise<DescribeLocationSmbCommandOutput> | void {
  735. const command = new DescribeLocationSmbCommand(args);
  736. if (typeof optionsOrCb === "function") {
  737. this.send(command, optionsOrCb);
  738. } else if (typeof cb === "function") {
  739. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  740. this.send(command, optionsOrCb || {}, cb);
  741. } else {
  742. return this.send(command, optionsOrCb);
  743. }
  744. }
  745. /**
  746. * <p>Returns metadata about a task.</p>
  747. */
  748. public describeTask(
  749. args: DescribeTaskCommandInput,
  750. options?: __HttpHandlerOptions
  751. ): Promise<DescribeTaskCommandOutput>;
  752. public describeTask(args: DescribeTaskCommandInput, cb: (err: any, data?: DescribeTaskCommandOutput) => void): void;
  753. public describeTask(
  754. args: DescribeTaskCommandInput,
  755. options: __HttpHandlerOptions,
  756. cb: (err: any, data?: DescribeTaskCommandOutput) => void
  757. ): void;
  758. public describeTask(
  759. args: DescribeTaskCommandInput,
  760. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeTaskCommandOutput) => void),
  761. cb?: (err: any, data?: DescribeTaskCommandOutput) => void
  762. ): Promise<DescribeTaskCommandOutput> | void {
  763. const command = new DescribeTaskCommand(args);
  764. if (typeof optionsOrCb === "function") {
  765. this.send(command, optionsOrCb);
  766. } else if (typeof cb === "function") {
  767. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  768. this.send(command, optionsOrCb || {}, cb);
  769. } else {
  770. return this.send(command, optionsOrCb);
  771. }
  772. }
  773. /**
  774. * <p>Returns detailed metadata about a task that is being executed.</p>
  775. */
  776. public describeTaskExecution(
  777. args: DescribeTaskExecutionCommandInput,
  778. options?: __HttpHandlerOptions
  779. ): Promise<DescribeTaskExecutionCommandOutput>;
  780. public describeTaskExecution(
  781. args: DescribeTaskExecutionCommandInput,
  782. cb: (err: any, data?: DescribeTaskExecutionCommandOutput) => void
  783. ): void;
  784. public describeTaskExecution(
  785. args: DescribeTaskExecutionCommandInput,
  786. options: __HttpHandlerOptions,
  787. cb: (err: any, data?: DescribeTaskExecutionCommandOutput) => void
  788. ): void;
  789. public describeTaskExecution(
  790. args: DescribeTaskExecutionCommandInput,
  791. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: DescribeTaskExecutionCommandOutput) => void),
  792. cb?: (err: any, data?: DescribeTaskExecutionCommandOutput) => void
  793. ): Promise<DescribeTaskExecutionCommandOutput> | void {
  794. const command = new DescribeTaskExecutionCommand(args);
  795. if (typeof optionsOrCb === "function") {
  796. this.send(command, optionsOrCb);
  797. } else if (typeof cb === "function") {
  798. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  799. this.send(command, optionsOrCb || {}, cb);
  800. } else {
  801. return this.send(command, optionsOrCb);
  802. }
  803. }
  804. /**
  805. * <p>Returns a list of agents owned by an AWS account in the AWS Region specified in the
  806. * request. The returned list is ordered by agent Amazon Resource Name (ARN).</p>
  807. * <p>By default, this operation returns a maximum of 100 agents. This operation supports
  808. * pagination that enables you to optionally reduce the number of agents returned in a
  809. * response.</p>
  810. * <p>If you have more agents than are returned in a response (that is, the response returns
  811. * only a truncated list of your agents), the response contains a marker that you can specify in
  812. * your next request to fetch the next page of agents.</p>
  813. */
  814. public listAgents(args: ListAgentsCommandInput, options?: __HttpHandlerOptions): Promise<ListAgentsCommandOutput>;
  815. public listAgents(args: ListAgentsCommandInput, cb: (err: any, data?: ListAgentsCommandOutput) => void): void;
  816. public listAgents(
  817. args: ListAgentsCommandInput,
  818. options: __HttpHandlerOptions,
  819. cb: (err: any, data?: ListAgentsCommandOutput) => void
  820. ): void;
  821. public listAgents(
  822. args: ListAgentsCommandInput,
  823. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListAgentsCommandOutput) => void),
  824. cb?: (err: any, data?: ListAgentsCommandOutput) => void
  825. ): Promise<ListAgentsCommandOutput> | void {
  826. const command = new ListAgentsCommand(args);
  827. if (typeof optionsOrCb === "function") {
  828. this.send(command, optionsOrCb);
  829. } else if (typeof cb === "function") {
  830. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  831. this.send(command, optionsOrCb || {}, cb);
  832. } else {
  833. return this.send(command, optionsOrCb);
  834. }
  835. }
  836. /**
  837. * <p>Returns a list of source and destination locations.</p>
  838. * <p>If you have more locations than are returned in a response (that is, the response
  839. * returns only a truncated list of your agents), the response contains a token that you can
  840. * specify in your next request to fetch the next page of locations.</p>
  841. */
  842. public listLocations(
  843. args: ListLocationsCommandInput,
  844. options?: __HttpHandlerOptions
  845. ): Promise<ListLocationsCommandOutput>;
  846. public listLocations(
  847. args: ListLocationsCommandInput,
  848. cb: (err: any, data?: ListLocationsCommandOutput) => void
  849. ): void;
  850. public listLocations(
  851. args: ListLocationsCommandInput,
  852. options: __HttpHandlerOptions,
  853. cb: (err: any, data?: ListLocationsCommandOutput) => void
  854. ): void;
  855. public listLocations(
  856. args: ListLocationsCommandInput,
  857. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListLocationsCommandOutput) => void),
  858. cb?: (err: any, data?: ListLocationsCommandOutput) => void
  859. ): Promise<ListLocationsCommandOutput> | void {
  860. const command = new ListLocationsCommand(args);
  861. if (typeof optionsOrCb === "function") {
  862. this.send(command, optionsOrCb);
  863. } else if (typeof cb === "function") {
  864. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  865. this.send(command, optionsOrCb || {}, cb);
  866. } else {
  867. return this.send(command, optionsOrCb);
  868. }
  869. }
  870. /**
  871. * <p>Returns all the tags associated with a specified resource. </p>
  872. */
  873. public listTagsForResource(
  874. args: ListTagsForResourceCommandInput,
  875. options?: __HttpHandlerOptions
  876. ): Promise<ListTagsForResourceCommandOutput>;
  877. public listTagsForResource(
  878. args: ListTagsForResourceCommandInput,
  879. cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
  880. ): void;
  881. public listTagsForResource(
  882. args: ListTagsForResourceCommandInput,
  883. options: __HttpHandlerOptions,
  884. cb: (err: any, data?: ListTagsForResourceCommandOutput) => void
  885. ): void;
  886. public listTagsForResource(
  887. args: ListTagsForResourceCommandInput,
  888. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTagsForResourceCommandOutput) => void),
  889. cb?: (err: any, data?: ListTagsForResourceCommandOutput) => void
  890. ): Promise<ListTagsForResourceCommandOutput> | void {
  891. const command = new ListTagsForResourceCommand(args);
  892. if (typeof optionsOrCb === "function") {
  893. this.send(command, optionsOrCb);
  894. } else if (typeof cb === "function") {
  895. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  896. this.send(command, optionsOrCb || {}, cb);
  897. } else {
  898. return this.send(command, optionsOrCb);
  899. }
  900. }
  901. /**
  902. * <p>Returns a list of executed tasks.</p>
  903. */
  904. public listTaskExecutions(
  905. args: ListTaskExecutionsCommandInput,
  906. options?: __HttpHandlerOptions
  907. ): Promise<ListTaskExecutionsCommandOutput>;
  908. public listTaskExecutions(
  909. args: ListTaskExecutionsCommandInput,
  910. cb: (err: any, data?: ListTaskExecutionsCommandOutput) => void
  911. ): void;
  912. public listTaskExecutions(
  913. args: ListTaskExecutionsCommandInput,
  914. options: __HttpHandlerOptions,
  915. cb: (err: any, data?: ListTaskExecutionsCommandOutput) => void
  916. ): void;
  917. public listTaskExecutions(
  918. args: ListTaskExecutionsCommandInput,
  919. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTaskExecutionsCommandOutput) => void),
  920. cb?: (err: any, data?: ListTaskExecutionsCommandOutput) => void
  921. ): Promise<ListTaskExecutionsCommandOutput> | void {
  922. const command = new ListTaskExecutionsCommand(args);
  923. if (typeof optionsOrCb === "function") {
  924. this.send(command, optionsOrCb);
  925. } else if (typeof cb === "function") {
  926. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  927. this.send(command, optionsOrCb || {}, cb);
  928. } else {
  929. return this.send(command, optionsOrCb);
  930. }
  931. }
  932. /**
  933. * <p>Returns a list of all the tasks.</p>
  934. */
  935. public listTasks(args: ListTasksCommandInput, options?: __HttpHandlerOptions): Promise<ListTasksCommandOutput>;
  936. public listTasks(args: ListTasksCommandInput, cb: (err: any, data?: ListTasksCommandOutput) => void): void;
  937. public listTasks(
  938. args: ListTasksCommandInput,
  939. options: __HttpHandlerOptions,
  940. cb: (err: any, data?: ListTasksCommandOutput) => void
  941. ): void;
  942. public listTasks(
  943. args: ListTasksCommandInput,
  944. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTasksCommandOutput) => void),
  945. cb?: (err: any, data?: ListTasksCommandOutput) => void
  946. ): Promise<ListTasksCommandOutput> | void {
  947. const command = new ListTasksCommand(args);
  948. if (typeof optionsOrCb === "function") {
  949. this.send(command, optionsOrCb);
  950. } else if (typeof cb === "function") {
  951. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  952. this.send(command, optionsOrCb || {}, cb);
  953. } else {
  954. return this.send(command, optionsOrCb);
  955. }
  956. }
  957. /**
  958. * <p>Starts a specific invocation of a task. A <code>TaskExecution</code> value represents
  959. * an individual run of a task. Each task can have at most one <code>TaskExecution</code> at a
  960. * time.</p>
  961. * <p>
  962. * <code>TaskExecution</code> has the following transition phases: INITIALIZING |
  963. * PREPARING | TRANSFERRING | VERIFYING | SUCCESS/FAILURE. </p>
  964. *
  965. * <p>For detailed information, see the Task Execution section in the Components
  966. * and Terminology topic in the <i>AWS DataSync User Guide</i>.</p>
  967. */
  968. public startTaskExecution(
  969. args: StartTaskExecutionCommandInput,
  970. options?: __HttpHandlerOptions
  971. ): Promise<StartTaskExecutionCommandOutput>;
  972. public startTaskExecution(
  973. args: StartTaskExecutionCommandInput,
  974. cb: (err: any, data?: StartTaskExecutionCommandOutput) => void
  975. ): void;
  976. public startTaskExecution(
  977. args: StartTaskExecutionCommandInput,
  978. options: __HttpHandlerOptions,
  979. cb: (err: any, data?: StartTaskExecutionCommandOutput) => void
  980. ): void;
  981. public startTaskExecution(
  982. args: StartTaskExecutionCommandInput,
  983. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: StartTaskExecutionCommandOutput) => void),
  984. cb?: (err: any, data?: StartTaskExecutionCommandOutput) => void
  985. ): Promise<StartTaskExecutionCommandOutput> | void {
  986. const command = new StartTaskExecutionCommand(args);
  987. if (typeof optionsOrCb === "function") {
  988. this.send(command, optionsOrCb);
  989. } else if (typeof cb === "function") {
  990. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  991. this.send(command, optionsOrCb || {}, cb);
  992. } else {
  993. return this.send(command, optionsOrCb);
  994. }
  995. }
  996. /**
  997. * <p>Applies a key-value pair to an AWS resource.</p>
  998. */
  999. public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
  1000. public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
  1001. public tagResource(
  1002. args: TagResourceCommandInput,
  1003. options: __HttpHandlerOptions,
  1004. cb: (err: any, data?: TagResourceCommandOutput) => void
  1005. ): void;
  1006. public tagResource(
  1007. args: TagResourceCommandInput,
  1008. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void),
  1009. cb?: (err: any, data?: TagResourceCommandOutput) => void
  1010. ): Promise<TagResourceCommandOutput> | void {
  1011. const command = new TagResourceCommand(args);
  1012. if (typeof optionsOrCb === "function") {
  1013. this.send(command, optionsOrCb);
  1014. } else if (typeof cb === "function") {
  1015. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  1016. this.send(command, optionsOrCb || {}, cb);
  1017. } else {
  1018. return this.send(command, optionsOrCb);
  1019. }
  1020. }
  1021. /**
  1022. * <p>Removes a tag from an AWS resource.</p>
  1023. */
  1024. public untagResource(
  1025. args: UntagResourceCommandInput,
  1026. options?: __HttpHandlerOptions
  1027. ): Promise<UntagResourceCommandOutput>;
  1028. public untagResource(
  1029. args: UntagResourceCommandInput,
  1030. cb: (err: any, data?: UntagResourceCommandOutput) => void
  1031. ): void;
  1032. public untagResource(
  1033. args: UntagResourceCommandInput,
  1034. options: __HttpHandlerOptions,
  1035. cb: (err: any, data?: UntagResourceCommandOutput) => void
  1036. ): void;
  1037. public untagResource(
  1038. args: UntagResourceCommandInput,
  1039. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void),
  1040. cb?: (err: any, data?: UntagResourceCommandOutput) => void
  1041. ): Promise<UntagResourceCommandOutput> | void {
  1042. const command = new UntagResourceCommand(args);
  1043. if (typeof optionsOrCb === "function") {
  1044. this.send(command, optionsOrCb);
  1045. } else if (typeof cb === "function") {
  1046. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  1047. this.send(command, optionsOrCb || {}, cb);
  1048. } else {
  1049. return this.send(command, optionsOrCb);
  1050. }
  1051. }
  1052. /**
  1053. * <p>Updates the name of an agent.</p>
  1054. */
  1055. public updateAgent(args: UpdateAgentCommandInput, options?: __HttpHandlerOptions): Promise<UpdateAgentCommandOutput>;
  1056. public updateAgent(args: UpdateAgentCommandInput, cb: (err: any, data?: UpdateAgentCommandOutput) => void): void;
  1057. public updateAgent(
  1058. args: UpdateAgentCommandInput,
  1059. options: __HttpHandlerOptions,
  1060. cb: (err: any, data?: UpdateAgentCommandOutput) => void
  1061. ): void;
  1062. public updateAgent(
  1063. args: UpdateAgentCommandInput,
  1064. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateAgentCommandOutput) => void),
  1065. cb?: (err: any, data?: UpdateAgentCommandOutput) => void
  1066. ): Promise<UpdateAgentCommandOutput> | void {
  1067. const command = new UpdateAgentCommand(args);
  1068. if (typeof optionsOrCb === "function") {
  1069. this.send(command, optionsOrCb);
  1070. } else if (typeof cb === "function") {
  1071. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  1072. this.send(command, optionsOrCb || {}, cb);
  1073. } else {
  1074. return this.send(command, optionsOrCb);
  1075. }
  1076. }
  1077. /**
  1078. * <p>Updates the metadata associated with a task.</p>
  1079. */
  1080. public updateTask(args: UpdateTaskCommandInput, options?: __HttpHandlerOptions): Promise<UpdateTaskCommandOutput>;
  1081. public updateTask(args: UpdateTaskCommandInput, cb: (err: any, data?: UpdateTaskCommandOutput) => void): void;
  1082. public updateTask(
  1083. args: UpdateTaskCommandInput,
  1084. options: __HttpHandlerOptions,
  1085. cb: (err: any, data?: UpdateTaskCommandOutput) => void
  1086. ): void;
  1087. public updateTask(
  1088. args: UpdateTaskCommandInput,
  1089. optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdateTaskCommandOutput) => void),
  1090. cb?: (err: any, data?: UpdateTaskCommandOutput) => void
  1091. ): Promise<UpdateTaskCommandOutput> | void {
  1092. const command = new UpdateTaskCommand(args);
  1093. if (typeof optionsOrCb === "function") {
  1094. this.send(command, optionsOrCb);
  1095. } else if (typeof cb === "function") {
  1096. if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
  1097. this.send(command, optionsOrCb || {}, cb);
  1098. } else {
  1099. return this.send(command, optionsOrCb);
  1100. }
  1101. }
  1102. }