@gradientedge/cdk-utils 8.80.0 → 8.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/lib/common/construct.d.ts +1 -0
- package/dist/src/lib/common/construct.js +2 -0
- package/dist/src/lib/manager/aws/evidently-manager.d.ts +60 -0
- package/dist/src/lib/manager/aws/evidently-manager.js +127 -0
- package/dist/src/lib/manager/aws/index.d.ts +1 -0
- package/dist/src/lib/manager/aws/index.js +1 -0
- package/dist/src/lib/types/aws/index.d.ts +31 -0
- package/package.json +1 -1
- package/src/lib/common/construct.ts +2 -0
- package/src/lib/manager/aws/evidently-manager.ts +108 -0
- package/src/lib/manager/aws/index.ts +1 -0
- package/src/lib/types/aws/index.ts +32 -0
|
@@ -35,6 +35,7 @@ export declare class CommonConstruct extends Construct {
|
|
|
35
35
|
elasticacheManager: aws.ElastiCacheManager;
|
|
36
36
|
eventManager: aws.EventManager;
|
|
37
37
|
eventTargetManager: aws.EventTargetManager;
|
|
38
|
+
evidentlyManager: aws.EvidentlyManager;
|
|
38
39
|
iamManager: aws.IamManager;
|
|
39
40
|
kmsManager: aws.KmsManager;
|
|
40
41
|
lambdaManager: aws.LambdaManager;
|
|
@@ -60,6 +60,7 @@ class CommonConstruct extends constructs_1.Construct {
|
|
|
60
60
|
elasticacheManager;
|
|
61
61
|
eventManager;
|
|
62
62
|
eventTargetManager;
|
|
63
|
+
evidentlyManager;
|
|
63
64
|
iamManager;
|
|
64
65
|
kmsManager;
|
|
65
66
|
lambdaManager;
|
|
@@ -92,6 +93,7 @@ class CommonConstruct extends constructs_1.Construct {
|
|
|
92
93
|
this.elasticacheManager = new aws.ElastiCacheManager();
|
|
93
94
|
this.eventManager = new aws.EventManager();
|
|
94
95
|
this.eventTargetManager = new aws.EventTargetManager();
|
|
96
|
+
this.evidentlyManager = new aws.EvidentlyManager();
|
|
95
97
|
this.iamManager = new aws.IamManager();
|
|
96
98
|
this.kmsManager = new aws.KmsManager();
|
|
97
99
|
this.lambdaManager = new aws.LambdaManager();
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as evidently from 'aws-cdk-lib/aws-evidently';
|
|
2
|
+
import * as common from '../../common';
|
|
3
|
+
import * as types from '../../types/aws';
|
|
4
|
+
/**
|
|
5
|
+
* @stability stable
|
|
6
|
+
* @category cdk-utils.evidently-manager
|
|
7
|
+
* @subcategory Construct
|
|
8
|
+
* @classdesc Provides operations on AWS Evidently.
|
|
9
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
10
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
11
|
+
* @example
|
|
12
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
13
|
+
*
|
|
14
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
15
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
16
|
+
* super(parent, id, props)
|
|
17
|
+
* this.props = props
|
|
18
|
+
* this.evidentlyManager.createProject('MyNewProhect', this, props)
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* @see [CDK Evidently Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_evidently-readme.html}
|
|
23
|
+
*/
|
|
24
|
+
export declare class EvidentlyManager {
|
|
25
|
+
/**
|
|
26
|
+
* @summary Method to create a project
|
|
27
|
+
* @param {string} id scoped id of the resource
|
|
28
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
29
|
+
* @param {EvidentlyProjectProps} props the project properties
|
|
30
|
+
*/
|
|
31
|
+
createProject(id: string, scope: common.CommonConstruct, props: types.EvidentlyProjectProps): evidently.CfnProject;
|
|
32
|
+
/**
|
|
33
|
+
* @summary Method to create a feature
|
|
34
|
+
* @param {string} id scoped id of the resource
|
|
35
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
36
|
+
* @param {EvidentlyFeatureProps} props the feature properties
|
|
37
|
+
*/
|
|
38
|
+
createFeature(id: string, scope: common.CommonConstruct, props: types.EvidentlyFeatureProps): evidently.CfnFeature;
|
|
39
|
+
/**
|
|
40
|
+
* @summary Method to create a launch
|
|
41
|
+
* @param {string} id scoped id of the resource
|
|
42
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
43
|
+
* @param {EvidentlyLaunchProps} props the launch properties
|
|
44
|
+
*/
|
|
45
|
+
createLaunch(id: string, scope: common.CommonConstruct, props: types.EvidentlyLaunchProps): evidently.CfnLaunch;
|
|
46
|
+
/**
|
|
47
|
+
* @summary Method to create an experiment
|
|
48
|
+
* @param {string} id scoped id of the resource
|
|
49
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
50
|
+
* @param {EvidentlyExperimentProps} props the experiment properties
|
|
51
|
+
*/
|
|
52
|
+
createExperiment(id: string, scope: common.CommonConstruct, props: types.EvidentlyExperimentProps): evidently.CfnExperiment;
|
|
53
|
+
/**
|
|
54
|
+
* @summary Method to create a segment
|
|
55
|
+
* @param {string} id scoped id of the resource
|
|
56
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
57
|
+
* @param {EvidentlySegmentProps} props the segment properties
|
|
58
|
+
*/
|
|
59
|
+
createSegment(id: string, scope: common.CommonConstruct, props: types.EvidentlySegmentProps): evidently.CfnSegment;
|
|
60
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.EvidentlyManager = void 0;
|
|
27
|
+
const evidently = __importStar(require("aws-cdk-lib/aws-evidently"));
|
|
28
|
+
const utils = __importStar(require("../../utils"));
|
|
29
|
+
/**
|
|
30
|
+
* @stability stable
|
|
31
|
+
* @category cdk-utils.evidently-manager
|
|
32
|
+
* @subcategory Construct
|
|
33
|
+
* @classdesc Provides operations on AWS Evidently.
|
|
34
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
35
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
36
|
+
* @example
|
|
37
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
38
|
+
*
|
|
39
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
40
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
41
|
+
* super(parent, id, props)
|
|
42
|
+
* this.props = props
|
|
43
|
+
* this.evidentlyManager.createProject('MyNewProhect', this, props)
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* @see [CDK Evidently Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_evidently-readme.html}
|
|
48
|
+
*/
|
|
49
|
+
class EvidentlyManager {
|
|
50
|
+
/**
|
|
51
|
+
* @summary Method to create a project
|
|
52
|
+
* @param {string} id scoped id of the resource
|
|
53
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
54
|
+
* @param {EvidentlyProjectProps} props the project properties
|
|
55
|
+
*/
|
|
56
|
+
createProject(id, scope, props) {
|
|
57
|
+
const project = new evidently.CfnProject(scope, `${id}`, {
|
|
58
|
+
...props,
|
|
59
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
60
|
+
description: `${props.description} ${scope.props.stage}`,
|
|
61
|
+
});
|
|
62
|
+
utils.createCfnOutput(`${id}-projectArn`, scope, project.attrArn);
|
|
63
|
+
utils.createCfnOutput(`${id}-projectName`, scope, project.name);
|
|
64
|
+
return project;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @summary Method to create a feature
|
|
68
|
+
* @param {string} id scoped id of the resource
|
|
69
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
70
|
+
* @param {EvidentlyFeatureProps} props the feature properties
|
|
71
|
+
*/
|
|
72
|
+
createFeature(id, scope, props) {
|
|
73
|
+
const feature = new evidently.CfnFeature(scope, `${id}`, props);
|
|
74
|
+
utils.createCfnOutput(`${id}-featureArn`, scope, feature.attrArn);
|
|
75
|
+
utils.createCfnOutput(`${id}-featureName`, scope, feature.name);
|
|
76
|
+
return feature;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @summary Method to create a launch
|
|
80
|
+
* @param {string} id scoped id of the resource
|
|
81
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
82
|
+
* @param {EvidentlyLaunchProps} props the launch properties
|
|
83
|
+
*/
|
|
84
|
+
createLaunch(id, scope, props) {
|
|
85
|
+
const launch = new evidently.CfnLaunch(scope, `${id}`, {
|
|
86
|
+
...props,
|
|
87
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
88
|
+
description: `${props.description} ${scope.props.stage}`,
|
|
89
|
+
});
|
|
90
|
+
utils.createCfnOutput(`${id}-launchArn`, scope, launch.attrArn);
|
|
91
|
+
utils.createCfnOutput(`${id}-launchName`, scope, launch.name);
|
|
92
|
+
return launch;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* @summary Method to create an experiment
|
|
96
|
+
* @param {string} id scoped id of the resource
|
|
97
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
98
|
+
* @param {EvidentlyExperimentProps} props the experiment properties
|
|
99
|
+
*/
|
|
100
|
+
createExperiment(id, scope, props) {
|
|
101
|
+
const experiment = new evidently.CfnExperiment(scope, `${id}`, {
|
|
102
|
+
...props,
|
|
103
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
104
|
+
description: `${props.description} ${scope.props.stage}`,
|
|
105
|
+
});
|
|
106
|
+
utils.createCfnOutput(`${id}-experimentArn`, scope, experiment.attrArn);
|
|
107
|
+
utils.createCfnOutput(`${id}-experimentName`, scope, experiment.name);
|
|
108
|
+
return experiment;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* @summary Method to create a segment
|
|
112
|
+
* @param {string} id scoped id of the resource
|
|
113
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
114
|
+
* @param {EvidentlySegmentProps} props the segment properties
|
|
115
|
+
*/
|
|
116
|
+
createSegment(id, scope, props) {
|
|
117
|
+
const segment = new evidently.CfnSegment(scope, `${id}`, {
|
|
118
|
+
...props,
|
|
119
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
120
|
+
description: `${props.description} ${scope.props.stage}`,
|
|
121
|
+
});
|
|
122
|
+
utils.createCfnOutput(`${id}-segmentArn`, scope, segment.attrArn);
|
|
123
|
+
utils.createCfnOutput(`${id}-segmentName`, scope, segment.name);
|
|
124
|
+
return segment;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.EvidentlyManager = EvidentlyManager;
|
|
@@ -13,6 +13,7 @@ export * from './eks-manager';
|
|
|
13
13
|
export * from './elasticache-manager';
|
|
14
14
|
export * from './event-manager';
|
|
15
15
|
export * from './event-target-manager';
|
|
16
|
+
export * from './evidently-manager';
|
|
16
17
|
export * from './iam-manager';
|
|
17
18
|
export * from './kms-manager';
|
|
18
19
|
export * from './lambda-manager';
|
|
@@ -29,6 +29,7 @@ __exportStar(require("./eks-manager"), exports);
|
|
|
29
29
|
__exportStar(require("./elasticache-manager"), exports);
|
|
30
30
|
__exportStar(require("./event-manager"), exports);
|
|
31
31
|
__exportStar(require("./event-target-manager"), exports);
|
|
32
|
+
__exportStar(require("./evidently-manager"), exports);
|
|
32
33
|
__exportStar(require("./iam-manager"), exports);
|
|
33
34
|
__exportStar(require("./kms-manager"), exports);
|
|
34
35
|
__exportStar(require("./lambda-manager"), exports);
|
|
@@ -30,6 +30,7 @@ import * as wafv2 from 'aws-cdk-lib/aws-wafv2';
|
|
|
30
30
|
import * as types from '../index';
|
|
31
31
|
import * as appAutoscaling from 'aws-cdk-lib/aws-applicationautoscaling';
|
|
32
32
|
import * as pipes from 'aws-cdk-lib/aws-pipes';
|
|
33
|
+
import * as evidently from 'aws-cdk-lib/aws-evidently';
|
|
33
34
|
/**
|
|
34
35
|
* @category cdk-utils.app-config-manager
|
|
35
36
|
* @subcategory Properties
|
|
@@ -740,6 +741,36 @@ export interface EventRuleProps extends events.RuleProps {
|
|
|
740
741
|
*/
|
|
741
742
|
export interface EventBusProps extends events.EventBusProps {
|
|
742
743
|
}
|
|
744
|
+
/**
|
|
745
|
+
* @category cdk-utils.evidently-manager
|
|
746
|
+
* @subcategory Properties
|
|
747
|
+
*/
|
|
748
|
+
export interface EvidentlyProjectProps extends evidently.CfnProjectProps {
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* @category cdk-utils.evidently-manager
|
|
752
|
+
* @subcategory Properties
|
|
753
|
+
*/
|
|
754
|
+
export interface EvidentlyFeatureProps extends evidently.CfnFeatureProps {
|
|
755
|
+
}
|
|
756
|
+
/**
|
|
757
|
+
* @category cdk-utils.evidently-manager
|
|
758
|
+
* @subcategory Properties
|
|
759
|
+
*/
|
|
760
|
+
export interface EvidentlyLaunchProps extends evidently.CfnLaunchProps {
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* @category cdk-utils.evidently-manager
|
|
764
|
+
* @subcategory Properties
|
|
765
|
+
*/
|
|
766
|
+
export interface EvidentlyExperimentProps extends evidently.CfnExperimentProps {
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* @category cdk-utils.evidently-manager
|
|
770
|
+
* @subcategory Properties
|
|
771
|
+
*/
|
|
772
|
+
export interface EvidentlySegmentProps extends evidently.CfnSegmentProps {
|
|
773
|
+
}
|
|
743
774
|
/**
|
|
744
775
|
* @category cdk-utils.common-stack
|
|
745
776
|
* @subcategory Properties
|
package/package.json
CHANGED
|
@@ -37,6 +37,7 @@ export class CommonConstruct extends Construct {
|
|
|
37
37
|
elasticacheManager: aws.ElastiCacheManager
|
|
38
38
|
eventManager: aws.EventManager
|
|
39
39
|
eventTargetManager: aws.EventTargetManager
|
|
40
|
+
evidentlyManager: aws.EvidentlyManager
|
|
40
41
|
iamManager: aws.IamManager
|
|
41
42
|
kmsManager: aws.KmsManager
|
|
42
43
|
lambdaManager: aws.LambdaManager
|
|
@@ -71,6 +72,7 @@ export class CommonConstruct extends Construct {
|
|
|
71
72
|
this.elasticacheManager = new aws.ElastiCacheManager()
|
|
72
73
|
this.eventManager = new aws.EventManager()
|
|
73
74
|
this.eventTargetManager = new aws.EventTargetManager()
|
|
75
|
+
this.evidentlyManager = new aws.EvidentlyManager()
|
|
74
76
|
this.iamManager = new aws.IamManager()
|
|
75
77
|
this.kmsManager = new aws.KmsManager()
|
|
76
78
|
this.lambdaManager = new aws.LambdaManager()
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as evidently from 'aws-cdk-lib/aws-evidently'
|
|
2
|
+
import * as common from '../../common'
|
|
3
|
+
import * as types from '../../types/aws'
|
|
4
|
+
import * as utils from '../../utils'
|
|
5
|
+
import { EvidentlyExperimentProps, EvidentlySegmentProps } from '../../types'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @stability stable
|
|
9
|
+
* @category cdk-utils.evidently-manager
|
|
10
|
+
* @subcategory Construct
|
|
11
|
+
* @classdesc Provides operations on AWS Evidently.
|
|
12
|
+
* - A new instance of this class is injected into {@link common.CommonConstruct} constructor.
|
|
13
|
+
* - If a custom construct extends {@link common.CommonConstruct}, an instance is available within the context.
|
|
14
|
+
* @example
|
|
15
|
+
* import * as common from '@gradientedge/cdk-utils'
|
|
16
|
+
*
|
|
17
|
+
* class CustomConstruct extends common.common.CommonConstruct {
|
|
18
|
+
* constructor(parent: cdk.Construct, id: string, props: common.CommonStackProps) {
|
|
19
|
+
* super(parent, id, props)
|
|
20
|
+
* this.props = props
|
|
21
|
+
* this.evidentlyManager.createProject('MyNewProhect', this, props)
|
|
22
|
+
* }
|
|
23
|
+
* }
|
|
24
|
+
*
|
|
25
|
+
* @see [CDK Evidently Module]{@link https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_evidently-readme.html}
|
|
26
|
+
*/
|
|
27
|
+
export class EvidentlyManager {
|
|
28
|
+
/**
|
|
29
|
+
* @summary Method to create a project
|
|
30
|
+
* @param {string} id scoped id of the resource
|
|
31
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
32
|
+
* @param {EvidentlyProjectProps} props the project properties
|
|
33
|
+
*/
|
|
34
|
+
public createProject(id: string, scope: common.CommonConstruct, props: types.EvidentlyProjectProps) {
|
|
35
|
+
const project = new evidently.CfnProject(scope, `${id}`, {
|
|
36
|
+
...props,
|
|
37
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
38
|
+
description: `${props.description} ${scope.props.stage}`,
|
|
39
|
+
})
|
|
40
|
+
utils.createCfnOutput(`${id}-projectArn`, scope, project.attrArn)
|
|
41
|
+
utils.createCfnOutput(`${id}-projectName`, scope, project.name)
|
|
42
|
+
return project
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @summary Method to create a feature
|
|
47
|
+
* @param {string} id scoped id of the resource
|
|
48
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
49
|
+
* @param {EvidentlyFeatureProps} props the feature properties
|
|
50
|
+
*/
|
|
51
|
+
public createFeature(id: string, scope: common.CommonConstruct, props: types.EvidentlyFeatureProps) {
|
|
52
|
+
const feature = new evidently.CfnFeature(scope, `${id}`, props)
|
|
53
|
+
utils.createCfnOutput(`${id}-featureArn`, scope, feature.attrArn)
|
|
54
|
+
utils.createCfnOutput(`${id}-featureName`, scope, feature.name)
|
|
55
|
+
return feature
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @summary Method to create a launch
|
|
60
|
+
* @param {string} id scoped id of the resource
|
|
61
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
62
|
+
* @param {EvidentlyLaunchProps} props the launch properties
|
|
63
|
+
*/
|
|
64
|
+
public createLaunch(id: string, scope: common.CommonConstruct, props: types.EvidentlyLaunchProps) {
|
|
65
|
+
const launch = new evidently.CfnLaunch(scope, `${id}`, {
|
|
66
|
+
...props,
|
|
67
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
68
|
+
description: `${props.description} ${scope.props.stage}`,
|
|
69
|
+
})
|
|
70
|
+
utils.createCfnOutput(`${id}-launchArn`, scope, launch.attrArn)
|
|
71
|
+
utils.createCfnOutput(`${id}-launchName`, scope, launch.name)
|
|
72
|
+
return launch
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @summary Method to create an experiment
|
|
77
|
+
* @param {string} id scoped id of the resource
|
|
78
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
79
|
+
* @param {EvidentlyExperimentProps} props the experiment properties
|
|
80
|
+
*/
|
|
81
|
+
public createExperiment(id: string, scope: common.CommonConstruct, props: types.EvidentlyExperimentProps) {
|
|
82
|
+
const experiment = new evidently.CfnExperiment(scope, `${id}`, {
|
|
83
|
+
...props,
|
|
84
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
85
|
+
description: `${props.description} ${scope.props.stage}`,
|
|
86
|
+
})
|
|
87
|
+
utils.createCfnOutput(`${id}-experimentArn`, scope, experiment.attrArn)
|
|
88
|
+
utils.createCfnOutput(`${id}-experimentName`, scope, experiment.name)
|
|
89
|
+
return experiment
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @summary Method to create a segment
|
|
94
|
+
* @param {string} id scoped id of the resource
|
|
95
|
+
* @param {common.CommonConstruct} scope scope in which this resource is defined
|
|
96
|
+
* @param {EvidentlySegmentProps} props the segment properties
|
|
97
|
+
*/
|
|
98
|
+
public createSegment(id: string, scope: common.CommonConstruct, props: types.EvidentlySegmentProps) {
|
|
99
|
+
const segment = new evidently.CfnSegment(scope, `${id}`, {
|
|
100
|
+
...props,
|
|
101
|
+
name: `${props.name}-${scope.props.stage}`,
|
|
102
|
+
description: `${props.description} ${scope.props.stage}`,
|
|
103
|
+
})
|
|
104
|
+
utils.createCfnOutput(`${id}-segmentArn`, scope, segment.attrArn)
|
|
105
|
+
utils.createCfnOutput(`${id}-segmentName`, scope, segment.name)
|
|
106
|
+
return segment
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -13,6 +13,7 @@ export * from './eks-manager'
|
|
|
13
13
|
export * from './elasticache-manager'
|
|
14
14
|
export * from './event-manager'
|
|
15
15
|
export * from './event-target-manager'
|
|
16
|
+
export * from './evidently-manager'
|
|
16
17
|
export * from './iam-manager'
|
|
17
18
|
export * from './kms-manager'
|
|
18
19
|
export * from './lambda-manager'
|
|
@@ -30,6 +30,8 @@ import * as wafv2 from 'aws-cdk-lib/aws-wafv2'
|
|
|
30
30
|
import * as types from '../index'
|
|
31
31
|
import * as appAutoscaling from 'aws-cdk-lib/aws-applicationautoscaling'
|
|
32
32
|
import * as pipes from 'aws-cdk-lib/aws-pipes'
|
|
33
|
+
import * as evidently from 'aws-cdk-lib/aws-evidently'
|
|
34
|
+
import { CfnExperimentProps, CfnFeatureProps, CfnSegmentProps } from 'aws-cdk-lib/aws-evidently/lib/evidently.generated'
|
|
33
35
|
|
|
34
36
|
/**
|
|
35
37
|
* @category cdk-utils.app-config-manager
|
|
@@ -791,6 +793,36 @@ export interface EventRuleProps extends events.RuleProps {
|
|
|
791
793
|
*/
|
|
792
794
|
export interface EventBusProps extends events.EventBusProps {}
|
|
793
795
|
|
|
796
|
+
/**
|
|
797
|
+
* @category cdk-utils.evidently-manager
|
|
798
|
+
* @subcategory Properties
|
|
799
|
+
*/
|
|
800
|
+
export interface EvidentlyProjectProps extends evidently.CfnProjectProps {}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* @category cdk-utils.evidently-manager
|
|
804
|
+
* @subcategory Properties
|
|
805
|
+
*/
|
|
806
|
+
export interface EvidentlyFeatureProps extends evidently.CfnFeatureProps {}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* @category cdk-utils.evidently-manager
|
|
810
|
+
* @subcategory Properties
|
|
811
|
+
*/
|
|
812
|
+
export interface EvidentlyLaunchProps extends evidently.CfnLaunchProps {}
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* @category cdk-utils.evidently-manager
|
|
816
|
+
* @subcategory Properties
|
|
817
|
+
*/
|
|
818
|
+
export interface EvidentlyExperimentProps extends evidently.CfnExperimentProps {}
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* @category cdk-utils.evidently-manager
|
|
822
|
+
* @subcategory Properties
|
|
823
|
+
*/
|
|
824
|
+
export interface EvidentlySegmentProps extends evidently.CfnSegmentProps {}
|
|
825
|
+
|
|
794
826
|
/**
|
|
795
827
|
* @category cdk-utils.common-stack
|
|
796
828
|
* @subcategory Properties
|