2
2
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types" ;
3
3
4
4
import { BackupClient } from "./BackupClient" ;
5
+ import {
6
+ CancelLegalHoldCommand ,
7
+ CancelLegalHoldCommandInput ,
8
+ CancelLegalHoldCommandOutput ,
9
+ } from "./commands/CancelLegalHoldCommand" ;
5
10
import {
6
11
CreateBackupPlanCommand ,
7
12
CreateBackupPlanCommandInput ,
@@ -22,6 +27,11 @@ import {
22
27
CreateFrameworkCommandInput ,
23
28
CreateFrameworkCommandOutput ,
24
29
} from "./commands/CreateFrameworkCommand" ;
30
+ import {
31
+ CreateLegalHoldCommand ,
32
+ CreateLegalHoldCommandInput ,
33
+ CreateLegalHoldCommandOutput ,
34
+ } from "./commands/CreateLegalHoldCommand" ;
25
35
import {
26
36
CreateReportPlanCommand ,
27
37
CreateReportPlanCommandInput ,
@@ -132,6 +142,11 @@ import {
132
142
DisassociateRecoveryPointCommandInput ,
133
143
DisassociateRecoveryPointCommandOutput ,
134
144
} from "./commands/DisassociateRecoveryPointCommand" ;
145
+ import {
146
+ DisassociateRecoveryPointFromParentCommand ,
147
+ DisassociateRecoveryPointFromParentCommandInput ,
148
+ DisassociateRecoveryPointFromParentCommandOutput ,
149
+ } from "./commands/DisassociateRecoveryPointFromParentCommand" ;
135
150
import {
136
151
ExportBackupPlanTemplateCommand ,
137
152
ExportBackupPlanTemplateCommandInput ,
@@ -167,6 +182,11 @@ import {
167
182
GetBackupVaultNotificationsCommandInput ,
168
183
GetBackupVaultNotificationsCommandOutput ,
169
184
} from "./commands/GetBackupVaultNotificationsCommand" ;
185
+ import {
186
+ GetLegalHoldCommand ,
187
+ GetLegalHoldCommandInput ,
188
+ GetLegalHoldCommandOutput ,
189
+ } from "./commands/GetLegalHoldCommand" ;
170
190
import {
171
191
GetRecoveryPointRestoreMetadataCommand ,
172
192
GetRecoveryPointRestoreMetadataCommandInput ,
@@ -217,6 +237,11 @@ import {
217
237
ListFrameworksCommandInput ,
218
238
ListFrameworksCommandOutput ,
219
239
} from "./commands/ListFrameworksCommand" ;
240
+ import {
241
+ ListLegalHoldsCommand ,
242
+ ListLegalHoldsCommandInput ,
243
+ ListLegalHoldsCommandOutput ,
244
+ } from "./commands/ListLegalHoldsCommand" ;
220
245
import {
221
246
ListProtectedResourcesCommand ,
222
247
ListProtectedResourcesCommandInput ,
@@ -227,6 +252,11 @@ import {
227
252
ListRecoveryPointsByBackupVaultCommandInput ,
228
253
ListRecoveryPointsByBackupVaultCommandOutput ,
229
254
} from "./commands/ListRecoveryPointsByBackupVaultCommand" ;
255
+ import {
256
+ ListRecoveryPointsByLegalHoldCommand ,
257
+ ListRecoveryPointsByLegalHoldCommandInput ,
258
+ ListRecoveryPointsByLegalHoldCommandOutput ,
259
+ } from "./commands/ListRecoveryPointsByLegalHoldCommand" ;
230
260
import {
231
261
ListRecoveryPointsByResourceCommand ,
232
262
ListRecoveryPointsByResourceCommandInput ,
@@ -333,6 +363,39 @@ import {
333
363
* auditing.</p>
334
364
*/
335
365
export class Backup extends BackupClient {
366
+ /**
367
+ * <p>This action removes the specified legal hold on a recovery point.
368
+ * This action can only be performed by a user with sufficient permissions.</p>
369
+ */
370
+ public cancelLegalHold (
371
+ args : CancelLegalHoldCommandInput ,
372
+ options ?: __HttpHandlerOptions
373
+ ) : Promise < CancelLegalHoldCommandOutput > ;
374
+ public cancelLegalHold (
375
+ args : CancelLegalHoldCommandInput ,
376
+ cb : ( err : any , data ?: CancelLegalHoldCommandOutput ) => void
377
+ ) : void ;
378
+ public cancelLegalHold (
379
+ args : CancelLegalHoldCommandInput ,
380
+ options : __HttpHandlerOptions ,
381
+ cb : ( err : any , data ?: CancelLegalHoldCommandOutput ) => void
382
+ ) : void ;
383
+ public cancelLegalHold (
384
+ args : CancelLegalHoldCommandInput ,
385
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: CancelLegalHoldCommandOutput ) => void ) ,
386
+ cb ?: ( err : any , data ?: CancelLegalHoldCommandOutput ) => void
387
+ ) : Promise < CancelLegalHoldCommandOutput > | void {
388
+ const command = new CancelLegalHoldCommand ( args ) ;
389
+ if ( typeof optionsOrCb === "function" ) {
390
+ this . send ( command , optionsOrCb ) ;
391
+ } else if ( typeof cb === "function" ) {
392
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
393
+ this . send ( command , optionsOrCb || { } , cb ) ;
394
+ } else {
395
+ return this . send ( command , optionsOrCb ) ;
396
+ }
397
+ }
398
+
336
399
/**
337
400
* <p>Creates a backup plan using a backup plan name and backup rules. A backup plan is a
338
401
* document that contains information that Backup uses to schedule tasks that
@@ -475,6 +538,41 @@ export class Backup extends BackupClient {
475
538
}
476
539
}
477
540
541
+ /**
542
+ * <p>This action creates a legal hold on a recovery point (backup). A legal hold
543
+ * is a restraint on altering or deleting a backup until an authorized user cancels the
544
+ * legal hold. Any actions to delete or disassociate a recovery point will fail with
545
+ * an error if one or more active legal holds are on the recovery point.</p>
546
+ */
547
+ public createLegalHold (
548
+ args : CreateLegalHoldCommandInput ,
549
+ options ?: __HttpHandlerOptions
550
+ ) : Promise < CreateLegalHoldCommandOutput > ;
551
+ public createLegalHold (
552
+ args : CreateLegalHoldCommandInput ,
553
+ cb : ( err : any , data ?: CreateLegalHoldCommandOutput ) => void
554
+ ) : void ;
555
+ public createLegalHold (
556
+ args : CreateLegalHoldCommandInput ,
557
+ options : __HttpHandlerOptions ,
558
+ cb : ( err : any , data ?: CreateLegalHoldCommandOutput ) => void
559
+ ) : void ;
560
+ public createLegalHold (
561
+ args : CreateLegalHoldCommandInput ,
562
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: CreateLegalHoldCommandOutput ) => void ) ,
563
+ cb ?: ( err : any , data ?: CreateLegalHoldCommandOutput ) => void
564
+ ) : Promise < CreateLegalHoldCommandOutput > | void {
565
+ const command = new CreateLegalHoldCommand ( args ) ;
566
+ if ( typeof optionsOrCb === "function" ) {
567
+ this . send ( command , optionsOrCb ) ;
568
+ } else if ( typeof cb === "function" ) {
569
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
570
+ this . send ( command , optionsOrCb || { } , cb ) ;
571
+ } else {
572
+ return this . send ( command , optionsOrCb ) ;
573
+ }
574
+ }
575
+
478
576
/**
479
577
* <p>Creates a report plan. A report plan is a document that contains information about the
480
578
* contents of the report and where Backup will deliver it.</p>
@@ -747,6 +845,16 @@ export class Backup extends BackupClient {
747
845
* <p>Deletes the recovery point specified by a recovery point ID.</p>
748
846
* <p>If the recovery point ID belongs to a continuous backup, calling this endpoint deletes
749
847
* the existing continuous backup and stops future continuous backup.</p>
848
+ * <p>When an IAM role's permissions are insufficient to call this API, the service sends back
849
+ * an HTTP 200 response with an empty HTTP body, but the recovery point is not deleted.
850
+ * Instead, it enters an <code>EXPIRED</code> state.</p>
851
+ * <p>
852
+ * <code>EXPIRED</code> recovery points can be deleted with this API once the IAM role
853
+ * has the <code>iam:CreateServiceLinkedRole</code> action. To learn more about adding this role, see
854
+ * <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/deleting-backups.html#deleting-backups-troubleshooting">
855
+ * Troubleshooting manual deletions</a>.</p>
856
+ * <p>If the user or role is deleted or the permission within the role is removed,
857
+ * the deletion will not be successful and will enter an <code>EXPIRED</code> state.</p>
750
858
*/
751
859
public deleteRecoveryPoint (
752
860
args : DeleteRecoveryPointCommandInput ,
@@ -1207,6 +1315,39 @@ export class Backup extends BackupClient {
1207
1315
}
1208
1316
}
1209
1317
1318
+ /**
1319
+ * <p>This action to a specific child (nested) recovery point removes the relationship
1320
+ * between the specified recovery point and its parent (composite) recovery point.</p>
1321
+ */
1322
+ public disassociateRecoveryPointFromParent (
1323
+ args : DisassociateRecoveryPointFromParentCommandInput ,
1324
+ options ?: __HttpHandlerOptions
1325
+ ) : Promise < DisassociateRecoveryPointFromParentCommandOutput > ;
1326
+ public disassociateRecoveryPointFromParent (
1327
+ args : DisassociateRecoveryPointFromParentCommandInput ,
1328
+ cb : ( err : any , data ?: DisassociateRecoveryPointFromParentCommandOutput ) => void
1329
+ ) : void ;
1330
+ public disassociateRecoveryPointFromParent (
1331
+ args : DisassociateRecoveryPointFromParentCommandInput ,
1332
+ options : __HttpHandlerOptions ,
1333
+ cb : ( err : any , data ?: DisassociateRecoveryPointFromParentCommandOutput ) => void
1334
+ ) : void ;
1335
+ public disassociateRecoveryPointFromParent (
1336
+ args : DisassociateRecoveryPointFromParentCommandInput ,
1337
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: DisassociateRecoveryPointFromParentCommandOutput ) => void ) ,
1338
+ cb ?: ( err : any , data ?: DisassociateRecoveryPointFromParentCommandOutput ) => void
1339
+ ) : Promise < DisassociateRecoveryPointFromParentCommandOutput > | void {
1340
+ const command = new DisassociateRecoveryPointFromParentCommand ( args ) ;
1341
+ if ( typeof optionsOrCb === "function" ) {
1342
+ this . send ( command , optionsOrCb ) ;
1343
+ } else if ( typeof cb === "function" ) {
1344
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
1345
+ this . send ( command , optionsOrCb || { } , cb ) ;
1346
+ } else {
1347
+ return this . send ( command , optionsOrCb ) ;
1348
+ }
1349
+ }
1350
+
1210
1351
/**
1211
1352
* <p>Returns the backup plan that is specified by the plan ID as a backup template.</p>
1212
1353
*/
@@ -1434,6 +1575,36 @@ export class Backup extends BackupClient {
1434
1575
}
1435
1576
}
1436
1577
1578
+ /**
1579
+ * <p>This action returns details for a specified legal hold. The details are the
1580
+ * body of a legal hold in JSON format, in addition to metadata.</p>
1581
+ */
1582
+ public getLegalHold (
1583
+ args : GetLegalHoldCommandInput ,
1584
+ options ?: __HttpHandlerOptions
1585
+ ) : Promise < GetLegalHoldCommandOutput > ;
1586
+ public getLegalHold ( args : GetLegalHoldCommandInput , cb : ( err : any , data ?: GetLegalHoldCommandOutput ) => void ) : void ;
1587
+ public getLegalHold (
1588
+ args : GetLegalHoldCommandInput ,
1589
+ options : __HttpHandlerOptions ,
1590
+ cb : ( err : any , data ?: GetLegalHoldCommandOutput ) => void
1591
+ ) : void ;
1592
+ public getLegalHold (
1593
+ args : GetLegalHoldCommandInput ,
1594
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: GetLegalHoldCommandOutput ) => void ) ,
1595
+ cb ?: ( err : any , data ?: GetLegalHoldCommandOutput ) => void
1596
+ ) : Promise < GetLegalHoldCommandOutput > | void {
1597
+ const command = new GetLegalHoldCommand ( args ) ;
1598
+ if ( typeof optionsOrCb === "function" ) {
1599
+ this . send ( command , optionsOrCb ) ;
1600
+ } else if ( typeof cb === "function" ) {
1601
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
1602
+ this . send ( command , optionsOrCb || { } , cb ) ;
1603
+ } else {
1604
+ return this . send ( command , optionsOrCb ) ;
1605
+ }
1606
+ }
1607
+
1437
1608
/**
1438
1609
* <p>Returns a set of metadata key-value pairs that were used to create the backup.</p>
1439
1610
*/
@@ -1758,6 +1929,38 @@ export class Backup extends BackupClient {
1758
1929
}
1759
1930
}
1760
1931
1932
+ /**
1933
+ * <p>This action returns metadata about active and previous legal holds.</p>
1934
+ */
1935
+ public listLegalHolds (
1936
+ args : ListLegalHoldsCommandInput ,
1937
+ options ?: __HttpHandlerOptions
1938
+ ) : Promise < ListLegalHoldsCommandOutput > ;
1939
+ public listLegalHolds (
1940
+ args : ListLegalHoldsCommandInput ,
1941
+ cb : ( err : any , data ?: ListLegalHoldsCommandOutput ) => void
1942
+ ) : void ;
1943
+ public listLegalHolds (
1944
+ args : ListLegalHoldsCommandInput ,
1945
+ options : __HttpHandlerOptions ,
1946
+ cb : ( err : any , data ?: ListLegalHoldsCommandOutput ) => void
1947
+ ) : void ;
1948
+ public listLegalHolds (
1949
+ args : ListLegalHoldsCommandInput ,
1950
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: ListLegalHoldsCommandOutput ) => void ) ,
1951
+ cb ?: ( err : any , data ?: ListLegalHoldsCommandOutput ) => void
1952
+ ) : Promise < ListLegalHoldsCommandOutput > | void {
1953
+ const command = new ListLegalHoldsCommand ( args ) ;
1954
+ if ( typeof optionsOrCb === "function" ) {
1955
+ this . send ( command , optionsOrCb ) ;
1956
+ } else if ( typeof cb === "function" ) {
1957
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
1958
+ this . send ( command , optionsOrCb || { } , cb ) ;
1959
+ } else {
1960
+ return this . send ( command , optionsOrCb ) ;
1961
+ }
1962
+ }
1963
+
1761
1964
/**
1762
1965
* <p>Returns an array of resources successfully backed up by Backup, including
1763
1966
* the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a
@@ -1824,6 +2027,39 @@ export class Backup extends BackupClient {
1824
2027
}
1825
2028
}
1826
2029
2030
+ /**
2031
+ * <p>This action returns recovery point ARNs (Amazon Resource Names) of the
2032
+ * specified legal hold.</p>
2033
+ */
2034
+ public listRecoveryPointsByLegalHold (
2035
+ args : ListRecoveryPointsByLegalHoldCommandInput ,
2036
+ options ?: __HttpHandlerOptions
2037
+ ) : Promise < ListRecoveryPointsByLegalHoldCommandOutput > ;
2038
+ public listRecoveryPointsByLegalHold (
2039
+ args : ListRecoveryPointsByLegalHoldCommandInput ,
2040
+ cb : ( err : any , data ?: ListRecoveryPointsByLegalHoldCommandOutput ) => void
2041
+ ) : void ;
2042
+ public listRecoveryPointsByLegalHold (
2043
+ args : ListRecoveryPointsByLegalHoldCommandInput ,
2044
+ options : __HttpHandlerOptions ,
2045
+ cb : ( err : any , data ?: ListRecoveryPointsByLegalHoldCommandOutput ) => void
2046
+ ) : void ;
2047
+ public listRecoveryPointsByLegalHold (
2048
+ args : ListRecoveryPointsByLegalHoldCommandInput ,
2049
+ optionsOrCb ?: __HttpHandlerOptions | ( ( err : any , data ?: ListRecoveryPointsByLegalHoldCommandOutput ) => void ) ,
2050
+ cb ?: ( err : any , data ?: ListRecoveryPointsByLegalHoldCommandOutput ) => void
2051
+ ) : Promise < ListRecoveryPointsByLegalHoldCommandOutput > | void {
2052
+ const command = new ListRecoveryPointsByLegalHoldCommand ( args ) ;
2053
+ if ( typeof optionsOrCb === "function" ) {
2054
+ this . send ( command , optionsOrCb ) ;
2055
+ } else if ( typeof cb === "function" ) {
2056
+ if ( typeof optionsOrCb !== "object" ) throw new Error ( `Expect http options but get ${ typeof optionsOrCb } ` ) ;
2057
+ this . send ( command , optionsOrCb || { } , cb ) ;
2058
+ } else {
2059
+ return this . send ( command , optionsOrCb ) ;
2060
+ }
2061
+ }
2062
+
1827
2063
/**
1828
2064
* <p>Returns detailed information about all the recovery points of the type specified by a
1829
2065
* resource Amazon Resource Name (ARN).</p>
@@ -2224,6 +2460,10 @@ export class Backup extends BackupClient {
2224
2460
2225
2461
/**
2226
2462
* <p>Attempts to cancel a job to create a one-time backup of a resource.</p>
2463
+ * <p>This action is not supported for the following services:
2464
+ * Amazon FSx for Windows File Server, Amazon FSx for Lustre, FSx for ONTAP
2465
+ * , Amazon FSx for OpenZFS, Amazon DocumentDB (with MongoDB compatibility), Amazon RDS, Amazon Aurora,
2466
+ * and Amazon Neptune.</p>
2227
2467
*/
2228
2468
public stopBackupJob (
2229
2469
args : StopBackupJobCommandInput ,
0 commit comments