Skip to content

Commit 2e6dd08

Browse files
authored
feat!: updated cloud buckup restore job and tests (#145)
1 parent a4fc3ae commit 2e6dd08

File tree

5 files changed

+259
-50
lines changed

5 files changed

+259
-50
lines changed

API.md

Lines changed: 140 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/l1-resources/cloud-backup-restore-jobs.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { CfnCloudBackUpRestoreJobsPropsInstanceType } from './../../src/l1-resources/cloud-backup-restore-jobs/index';
12
import * as cdk from 'aws-cdk-lib';
23
import { Construct } from 'constructs';
34
import { CfnCloudBackUpRestoreJobs, CfnCloudBackUpRestoreJobsPropsDeliveryType } from 'awscdk-resources-mongodbatlas';
@@ -6,7 +7,7 @@ interface AtlasStackProps {
67
readonly projId: string;
78
readonly profile: string;
89
readonly snapshotId: string;
9-
readonly clusterName: string;
10+
readonly instanceName: string;
1011
readonly targetClusterName: string;
1112
readonly targerProjId: string;
1213
}
@@ -17,8 +18,9 @@ export class CdkTestingStack extends cdk.Stack {
1718

1819
const atlasProps = this.getContextProps();
1920

20-
const cloudBackupRestoreJobs = new CfnCloudBackUpRestoreJobs(this, 'CloudBackupRestoreJobs', {
21-
clusterName: atlasProps.clusterName,
21+
new CfnCloudBackUpRestoreJobs(this, 'CloudBackupRestoreJobs', {
22+
instanceName: atlasProps.instanceName,
23+
instanceType: CfnCloudBackUpRestoreJobsPropsInstanceType.CLUSTER,
2224
projectId: atlasProps.projId,
2325
profile: atlasProps.profile,
2426
snapshotId: atlasProps.snapshotId,
@@ -37,15 +39,15 @@ export class CdkTestingStack extends cdk.Stack {
3739
}
3840
const snapshotId = this.node.tryGetContext('snapshotId');
3941
const profile = this.node.tryGetContext('profile') ?? 'default';
40-
const clusterName = this.node.tryGetContext('clusterName');
42+
const instanceName = this.node.tryGetContext('instanceName');
4143
const targetClusterName = this.node.tryGetContext('targetClusterName');
4244
const targerProjId = this.node.tryGetContext('targerProjId');
4345

4446
return {
4547
projId,
4648
profile,
4749
snapshotId,
48-
clusterName,
50+
instanceName,
4951
targetClusterName,
5052
targerProjId
5153
}

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ export {
6464
CfnCloudBackUpRestoreJobs,
6565
CfnCloudBackUpRestoreJobsProps,
6666
CfnCloudBackUpRestoreJobsPropsDeliveryType,
67+
CfnCloudBackUpRestoreJobsPropsInstanceType,
68+
SynchronousCreationOptions,
6769
} from "./l1-resources/cloud-backup-restore-jobs";
6870

6971
export {

0 commit comments

Comments
 (0)