UNPKG

4.37 kBJavaScriptView Raw
1function _aws_cdk_aws_kms_IKey(p) {
2}
3function _aws_cdk_aws_kms_KeySpec(p) {
4}
5function _aws_cdk_aws_kms_KeyUsage(p) {
6}
7function _aws_cdk_aws_kms_KeyProps(p) {
8 if (p == null)
9 return;
10 visitedObjects.add(p);
11 try {
12 if (p.admins != null)
13 for (const o of p.admins)
14 if (!visitedObjects.has(o))
15 require("@aws-cdk/aws-iam/.warnings.jsii.js")._aws_cdk_aws_iam_IPrincipal(o);
16 if (!visitedObjects.has(p.keySpec))
17 _aws_cdk_aws_kms_KeySpec(p.keySpec);
18 if (!visitedObjects.has(p.keyUsage))
19 _aws_cdk_aws_kms_KeyUsage(p.keyUsage);
20 if ("trustAccountIdentities" in p)
21 print("@aws-cdk/aws-kms.KeyProps#trustAccountIdentities", "redundant with the `@aws-cdk/aws-kms:defaultKeyPolicies` feature flag");
22 }
23 finally {
24 visitedObjects.delete(p);
25 }
26}
27function _aws_cdk_aws_kms_Key(p) {
28}
29function _aws_cdk_aws_kms_KeyLookupOptions(p) {
30}
31function _aws_cdk_aws_kms_IAlias(p) {
32}
33function _aws_cdk_aws_kms_AliasProps(p) {
34 if (p == null)
35 return;
36 visitedObjects.add(p);
37 try {
38 if (!visitedObjects.has(p.targetKey))
39 _aws_cdk_aws_kms_IKey(p.targetKey);
40 }
41 finally {
42 visitedObjects.delete(p);
43 }
44}
45function _aws_cdk_aws_kms_AliasAttributes(p) {
46 if (p == null)
47 return;
48 visitedObjects.add(p);
49 try {
50 if (!visitedObjects.has(p.aliasTargetKey))
51 _aws_cdk_aws_kms_IKey(p.aliasTargetKey);
52 }
53 finally {
54 visitedObjects.delete(p);
55 }
56}
57function _aws_cdk_aws_kms_Alias(p) {
58}
59function _aws_cdk_aws_kms_ViaServicePrincipal(p) {
60}
61function _aws_cdk_aws_kms_CfnAliasProps(p) {
62}
63function _aws_cdk_aws_kms_CfnAlias(p) {
64}
65function _aws_cdk_aws_kms_CfnKeyProps(p) {
66 if (p == null)
67 return;
68 visitedObjects.add(p);
69 try {
70 if (p.tags != null)
71 for (const o of p.tags)
72 if (!visitedObjects.has(o))
73 require("@aws-cdk/core/.warnings.jsii.js")._aws_cdk_core_CfnTag(o);
74 }
75 finally {
76 visitedObjects.delete(p);
77 }
78}
79function _aws_cdk_aws_kms_CfnKey(p) {
80}
81function _aws_cdk_aws_kms_CfnReplicaKeyProps(p) {
82 if (p == null)
83 return;
84 visitedObjects.add(p);
85 try {
86 if (p.tags != null)
87 for (const o of p.tags)
88 if (!visitedObjects.has(o))
89 require("@aws-cdk/core/.warnings.jsii.js")._aws_cdk_core_CfnTag(o);
90 }
91 finally {
92 visitedObjects.delete(p);
93 }
94}
95function _aws_cdk_aws_kms_CfnReplicaKey(p) {
96}
97function print(name, deprecationMessage) {
98 const deprecated = process.env.JSII_DEPRECATED;
99 const deprecationMode = ["warn", "fail", "quiet"].includes(deprecated) ? deprecated : "warn";
100 const message = `${name} is deprecated.\n ${deprecationMessage.trim()}\n This API will be removed in the next major release.`;
101 switch (deprecationMode) {
102 case "fail":
103 throw new DeprecationError(message);
104 case "warn":
105 console.warn("[WARNING]", message);
106 break;
107 }
108}
109function getPropertyDescriptor(obj, prop) {
110 const descriptor = Object.getOwnPropertyDescriptor(obj, prop);
111 if (descriptor) {
112 return descriptor;
113 }
114 const proto = Object.getPrototypeOf(obj);
115 const prototypeDescriptor = proto && getPropertyDescriptor(proto, prop);
116 if (prototypeDescriptor) {
117 return prototypeDescriptor;
118 }
119 return {};
120}
121const visitedObjects = new Set();
122class DeprecationError extends Error {
123 constructor(...args) {
124 super(...args);
125 Object.defineProperty(this, "name", {
126 configurable: false,
127 enumerable: true,
128 value: "DeprecationError",
129 writable: false,
130 });
131 }
132}
133module.exports = { print, getPropertyDescriptor, DeprecationError, _aws_cdk_aws_kms_IKey, _aws_cdk_aws_kms_KeySpec, _aws_cdk_aws_kms_KeyUsage, _aws_cdk_aws_kms_KeyProps, _aws_cdk_aws_kms_Key, _aws_cdk_aws_kms_KeyLookupOptions, _aws_cdk_aws_kms_IAlias, _aws_cdk_aws_kms_AliasProps, _aws_cdk_aws_kms_AliasAttributes, _aws_cdk_aws_kms_Alias, _aws_cdk_aws_kms_ViaServicePrincipal, _aws_cdk_aws_kms_CfnAliasProps, _aws_cdk_aws_kms_CfnAlias, _aws_cdk_aws_kms_CfnKeyProps, _aws_cdk_aws_kms_CfnKey, _aws_cdk_aws_kms_CfnReplicaKeyProps, _aws_cdk_aws_kms_CfnReplicaKey };