UNPKG

107 kBJSONView Raw
1{
2 "version": "2",
3 "toolVersion": "1.74.0",
4 "snippets": {
5 "0ad02fde94b94efd8e110217f997271482722082350c156da1225648d32ce940": {
6 "translations": {
7 "python": {
8 "source": "kms.Key(self, \"MyKey\",\n enable_key_rotation=True\n)",
9 "version": "2"
10 },
11 "csharp": {
12 "source": "new Key(this, \"MyKey\", new KeyProps {\n EnableKeyRotation = true\n});",
13 "version": "1"
14 },
15 "java": {
16 "source": "Key.Builder.create(this, \"MyKey\")\n .enableKeyRotation(true)\n .build();",
17 "version": "1"
18 },
19 "go": {
20 "source": "kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\tenableKeyRotation: jsii.Boolean(true),\n})",
21 "version": "1"
22 },
23 "$": {
24 "source": "new kms.Key(this, 'MyKey', {\n enableKeyRotation: true,\n});",
25 "version": "0"
26 }
27 },
28 "location": {
29 "api": {
30 "api": "moduleReadme",
31 "moduleFqn": "@aws-cdk/aws-kms"
32 },
33 "field": {
34 "field": "markdown",
35 "line": 16
36 }
37 },
38 "didCompile": true,
39 "fqnsReferenced": [
40 "@aws-cdk/aws-kms.Key",
41 "@aws-cdk/aws-kms.KeyProps",
42 "constructs.Construct"
43 ],
44 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew kms.Key(this, 'MyKey', {\n enableKeyRotation: true,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
45 "syntaxKindCounter": {
46 "10": 1,
47 "75": 3,
48 "104": 1,
49 "106": 1,
50 "193": 1,
51 "194": 1,
52 "197": 1,
53 "226": 1,
54 "281": 1
55 },
56 "fqnsFingerprint": "0916683fae71d7975297147cfff0b1a17e9636759086d074aba647a1c232945c"
57 },
58 "e311e0be03390f6d9c7731918629ad9cba3668ddc843bb1f3d01f8a782966700": {
59 "translations": {
60 "python": {
61 "source": "key = kms.Key(self, \"MyKey\",\n pending_window=Duration.days(10)\n)",
62 "version": "2"
63 },
64 "csharp": {
65 "source": "Key key = new Key(this, \"MyKey\", new KeyProps {\n PendingWindow = Duration.Days(10)\n});",
66 "version": "1"
67 },
68 "java": {
69 "source": "Key key = Key.Builder.create(this, \"MyKey\")\n .pendingWindow(Duration.days(10))\n .build();",
70 "version": "1"
71 },
72 "go": {
73 "source": "key := kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\tpendingWindow: *awscdkcore.Duration.days(jsii.Number(10)),\n})",
74 "version": "1"
75 },
76 "$": {
77 "source": "const key = new kms.Key(this, 'MyKey', {\n pendingWindow: Duration.days(10), // Default to 30 Days\n});",
78 "version": "0"
79 }
80 },
81 "location": {
82 "api": {
83 "api": "moduleReadme",
84 "moduleFqn": "@aws-cdk/aws-kms"
85 },
86 "field": {
87 "field": "markdown",
88 "line": 26
89 }
90 },
91 "didCompile": true,
92 "fqnsReferenced": [
93 "@aws-cdk/aws-kms.Key",
94 "@aws-cdk/aws-kms.KeyProps",
95 "@aws-cdk/core.Duration",
96 "@aws-cdk/core.Duration#days",
97 "constructs.Construct"
98 ],
99 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst key = new kms.Key(this, 'MyKey', {\n pendingWindow: Duration.days(10), // Default to 30 Days\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
100 "syntaxKindCounter": {
101 "8": 1,
102 "10": 1,
103 "75": 6,
104 "104": 1,
105 "193": 1,
106 "194": 2,
107 "196": 1,
108 "197": 1,
109 "225": 1,
110 "242": 1,
111 "243": 1,
112 "281": 1
113 },
114 "fqnsFingerprint": "6cc626c43b793cde9f0bcd32806daa182ca7f4dc7a425478af2237eaef472445"
115 },
116 "aabe9e5dab5a8b01bf60c651c2acd958585bc7f3233f837babcf3c85a5556f32": {
117 "translations": {
118 "python": {
119 "source": "key = kms.Key(self, \"MyKey\")\nkey.add_alias(\"alias/foo\")\nkey.add_alias(\"alias/bar\")",
120 "version": "2"
121 },
122 "csharp": {
123 "source": "Key key = new Key(this, \"MyKey\");\nkey.AddAlias(\"alias/foo\");\nkey.AddAlias(\"alias/bar\");",
124 "version": "1"
125 },
126 "java": {
127 "source": "Key key = new Key(this, \"MyKey\");\nkey.addAlias(\"alias/foo\");\nkey.addAlias(\"alias/bar\");",
128 "version": "1"
129 },
130 "go": {
131 "source": "key := kms.NewKey(this, jsii.String(\"MyKey\"))\nkey.addAlias(jsii.String(\"alias/foo\"))\nkey.addAlias(jsii.String(\"alias/bar\"))",
132 "version": "1"
133 },
134 "$": {
135 "source": "const key = new kms.Key(this, 'MyKey');\nkey.addAlias('alias/foo');\nkey.addAlias('alias/bar');",
136 "version": "0"
137 }
138 },
139 "location": {
140 "api": {
141 "api": "moduleReadme",
142 "moduleFqn": "@aws-cdk/aws-kms"
143 },
144 "field": {
145 "field": "markdown",
146 "line": 35
147 }
148 },
149 "didCompile": true,
150 "fqnsReferenced": [
151 "@aws-cdk/aws-kms.Key",
152 "constructs.Construct"
153 ],
154 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst key = new kms.Key(this, 'MyKey');\nkey.addAlias('alias/foo');\nkey.addAlias('alias/bar');\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
155 "syntaxKindCounter": {
156 "10": 3,
157 "75": 7,
158 "104": 1,
159 "194": 3,
160 "196": 2,
161 "197": 1,
162 "225": 1,
163 "226": 2,
164 "242": 1,
165 "243": 1
166 },
167 "fqnsFingerprint": "a62621ee079d3223aab5818f38b89b7d2c9028c6afab09be4874fe180e166099"
168 },
169 "05f7c34014b0352bb0aa31af76085551527fcc8037bbc1a5e1c2135fc51aa977": {
170 "translations": {
171 "python": {
172 "source": "key = kms.Key(self, \"MyKey\",\n key_spec=kms.KeySpec.ECC_SECG_P256K1, # Default to SYMMETRIC_DEFAULT\n key_usage=kms.KeyUsage.SIGN_VERIFY\n)",
173 "version": "2"
174 },
175 "csharp": {
176 "source": "Key key = new Key(this, \"MyKey\", new KeyProps {\n KeySpec = KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n KeyUsage = KeyUsage.SIGN_VERIFY\n});",
177 "version": "1"
178 },
179 "java": {
180 "source": "Key key = Key.Builder.create(this, \"MyKey\")\n .keySpec(KeySpec.ECC_SECG_P256K1) // Default to SYMMETRIC_DEFAULT\n .keyUsage(KeyUsage.SIGN_VERIFY)\n .build();",
181 "version": "1"
182 },
183 "go": {
184 "source": "key := kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\tkeySpec: kms.keySpec_ECC_SECG_P256K1,\n\t // Default to SYMMETRIC_DEFAULT\n\tkeyUsage: kms.keyUsage_SIGN_VERIFY,\n})",
185 "version": "1"
186 },
187 "$": {
188 "source": "const key = new kms.Key(this, 'MyKey', {\n keySpec: kms.KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n keyUsage: kms.KeyUsage.SIGN_VERIFY, // and ENCRYPT_DECRYPT\n});",
189 "version": "0"
190 }
191 },
192 "location": {
193 "api": {
194 "api": "moduleReadme",
195 "moduleFqn": "@aws-cdk/aws-kms"
196 },
197 "field": {
198 "field": "markdown",
199 "line": 46
200 }
201 },
202 "didCompile": true,
203 "fqnsReferenced": [
204 "@aws-cdk/aws-kms.Key",
205 "@aws-cdk/aws-kms.KeyProps",
206 "@aws-cdk/aws-kms.KeySpec",
207 "@aws-cdk/aws-kms.KeySpec#ECC_SECG_P256K1",
208 "@aws-cdk/aws-kms.KeyUsage",
209 "@aws-cdk/aws-kms.KeyUsage#SIGN_VERIFY",
210 "constructs.Construct"
211 ],
212 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst key = new kms.Key(this, 'MyKey', {\n keySpec: kms.KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n keyUsage: kms.KeyUsage.SIGN_VERIFY, // and ENCRYPT_DECRYPT\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
213 "syntaxKindCounter": {
214 "10": 1,
215 "75": 11,
216 "104": 1,
217 "193": 1,
218 "194": 5,
219 "197": 1,
220 "225": 1,
221 "242": 1,
222 "243": 1,
223 "281": 2
224 },
225 "fqnsFingerprint": "af77273d35526f63dc7723e77516d3dc2a7dd280b2a4cbb1856a56e1d91ae1c7"
226 },
227 "7273ddb7cb9e300bba421403e50a89bce99b234df22cc9e8edca632c941fa797": {
228 "translations": {
229 "python": {
230 "source": "#\n# Stack that defines the key\n#\nclass KeyStack(cdk.Stack):\n\n def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):\n super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)\n self.key = kms.Key(self, \"MyKey\", removal_policy=cdk.RemovalPolicy.DESTROY)\n\n#\n# Stack that uses the key\n#\nclass UseStack(cdk.Stack):\n def __init__(self, scope, id, *, key, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):\n super().__init__(scope, id, key=key, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)\n\n # Use the IKey object here.\n kms.Alias(self, \"Alias\",\n alias_name=\"alias/foo\",\n target_key=key\n )\n\nkey_stack = KeyStack(app, \"KeyStack\")\nUseStack(app, \"UseStack\", key=key_stack.key)",
231 "version": "2"
232 },
233 "csharp": {
234 "source": "/**\n * Stack that defines the key\n */\nclass KeyStack : Stack\n{\n public Key Key { get; }\n\n public KeyStack(App scope, string id, StackProps? props=null) : base(scope, id, props)\n {\n Key = new Key(this, \"MyKey\", new KeyProps { RemovalPolicy = RemovalPolicy.DESTROY });\n }\n}\n\nclass UseStackProps : StackProps\n{\n public IKey Key { get; set; }\n}\n\n/**\n * Stack that uses the key\n */\nclass UseStack : Stack\n{\n public UseStack(App scope, string id, UseStackProps props) : base(scope, id, props)\n {\n\n // Use the IKey object here.\n // Use the IKey object here.\n new Alias(this, \"Alias\", new AliasProps {\n AliasName = \"alias/foo\",\n TargetKey = props.Key\n });\n }\n}\n\nKeyStack keyStack = new KeyStack(app, \"KeyStack\");\nnew UseStack(app, \"UseStack\", new UseStackProps { Key = keyStack.Key });",
235 "version": "1"
236 },
237 "java": {
238 "source": "/**\n * Stack that defines the key\n */\npublic class KeyStack extends Stack {\n public final Key key;\n\n public KeyStack(App scope, String id) {\n this(scope, id, null);\n }\n\n public KeyStack(App scope, String id, StackProps props) {\n super(scope, id, props);\n this.key = Key.Builder.create(this, \"MyKey\").removalPolicy(RemovalPolicy.DESTROY).build();\n }\n}\n\npublic class UseStackProps extends StackProps {\n private IKey key;\n public IKey getKey() {\n return this.key;\n }\n public UseStackProps key(IKey key) {\n this.key = key;\n return this;\n }\n}\n\n/**\n * Stack that uses the key\n */\npublic class UseStack extends Stack {\n public UseStack(App scope, String id, UseStackProps props) {\n super(scope, id, props);\n\n // Use the IKey object here.\n // Use the IKey object here.\n Alias.Builder.create(this, \"Alias\")\n .aliasName(\"alias/foo\")\n .targetKey(props.getKey())\n .build();\n }\n}\n\nKeyStack keyStack = new KeyStack(app, \"KeyStack\");\nnew UseStack(app, \"UseStack\", new UseStackProps().key(keyStack.getKey()));",
239 "version": "1"
240 },
241 "go": {
242 "source": "/**\n * Stack that defines the key\n */\ntype keyStack struct {\n\tstack\n\tkey key\n}\n\nfunc newKeyStack(scope app, id *string, props stackProps) *keyStack {\n\tthis := &keyStack{}\n\tcdk.NewStack_Override(this, scope, id, props)\n\tthis.key = kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\t\tremovalPolicy: cdk.removalPolicy_DESTROY,\n\t})\n\treturn this\n}\n\ntype useStackProps struct {\n\tstackProps\n\tkey iKey\n}\n\n/**\n * Stack that uses the key\n */\ntype useStack struct {\n\tstack\n}\n\nfunc newUseStack(scope app, id *string, props useStackProps) *useStack {\n\tthis := &useStack{}\n\tcdk.NewStack_Override(this, scope, id, props)\n\n\t// Use the IKey object here.\n\t// Use the IKey object here.\n\tkms.NewAlias(this, jsii.String(\"Alias\"), &aliasProps{\n\t\taliasName: jsii.String(\"alias/foo\"),\n\t\ttargetKey: props.key,\n\t})\n\treturn this\n}\n\nkeyStack := NewKeyStack(app, jsii.String(\"KeyStack\"))\nNewUseStack(app, jsii.String(\"UseStack\"), &useStackProps{\n\tkey: keyStack.key,\n})",
243 "version": "1"
244 },
245 "$": {
246 "source": "\n/**\n * Stack that defines the key\n */\nclass KeyStack extends cdk.Stack {\n public readonly key: kms.Key;\n\n constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {\n super(scope, id, props);\n this.key = new kms.Key(this, 'MyKey', { removalPolicy: cdk.RemovalPolicy.DESTROY });\n }\n}\n\ninterface UseStackProps extends cdk.StackProps {\n key: kms.IKey; // Use IKey here\n}\n\n/**\n * Stack that uses the key\n */\nclass UseStack extends cdk.Stack {\n constructor(scope: cdk.App, id: string, props: UseStackProps) {\n super(scope, id, props);\n\n // Use the IKey object here.\n new kms.Alias(this, 'Alias', {\n aliasName: 'alias/foo',\n targetKey: props.key,\n });\n }\n}\n\nconst keyStack = new KeyStack(app, 'KeyStack');\nnew UseStack(app, 'UseStack', { key: keyStack.key });",
247 "version": "0"
248 }
249 },
250 "location": {
251 "api": {
252 "api": "moduleReadme",
253 "moduleFqn": "@aws-cdk/aws-kms"
254 },
255 "field": {
256 "field": "markdown",
257 "line": 58
258 }
259 },
260 "didCompile": true,
261 "fqnsReferenced": [
262 "@aws-cdk/aws-kms.Alias",
263 "@aws-cdk/aws-kms.AliasProps",
264 "@aws-cdk/aws-kms.IKey",
265 "@aws-cdk/aws-kms.Key",
266 "@aws-cdk/aws-kms.KeyProps",
267 "@aws-cdk/core.App",
268 "@aws-cdk/core.RemovalPolicy",
269 "@aws-cdk/core.RemovalPolicy#DESTROY",
270 "@aws-cdk/core.Stack",
271 "@aws-cdk/core.StackProps",
272 "constructs.Construct"
273 ],
274 "fullSource": "/// !cdk-integ *\nimport * as cdk from '@aws-cdk/core';\nimport * as kms from '../lib';\n\nconst app = new cdk.App();\n\n/// !show\n\n/**\n * Stack that defines the key\n */\nclass KeyStack extends cdk.Stack {\n public readonly key: kms.Key;\n\n constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {\n super(scope, id, props);\n this.key = new kms.Key(this, 'MyKey', { removalPolicy: cdk.RemovalPolicy.DESTROY });\n }\n}\n\ninterface UseStackProps extends cdk.StackProps {\n key: kms.IKey; // Use IKey here\n}\n\n/**\n * Stack that uses the key\n */\nclass UseStack extends cdk.Stack {\n constructor(scope: cdk.App, id: string, props: UseStackProps) {\n super(scope, id, props);\n\n // Use the IKey object here.\n new kms.Alias(this, 'Alias', {\n aliasName: 'alias/foo',\n targetKey: props.key,\n });\n }\n}\n\nconst keyStack = new KeyStack(app, 'KeyStack');\nnew UseStack(app, 'UseStack', { key: keyStack.key });\n/// !hide\n\napp.synth();\n",
275 "syntaxKindCounter": {
276 "10": 5,
277 "57": 1,
278 "62": 1,
279 "75": 55,
280 "102": 2,
281 "104": 3,
282 "119": 1,
283 "138": 1,
284 "143": 2,
285 "153": 5,
286 "156": 6,
287 "158": 1,
288 "159": 1,
289 "162": 2,
290 "169": 6,
291 "193": 3,
292 "194": 10,
293 "196": 2,
294 "197": 4,
295 "209": 1,
296 "216": 3,
297 "223": 2,
298 "225": 1,
299 "226": 5,
300 "242": 1,
301 "243": 1,
302 "245": 2,
303 "246": 1,
304 "279": 3,
305 "281": 4
306 },
307 "fqnsFingerprint": "dc71a585e1b7712ce79e1bf6ccb15a9dfec364ea15d88ab0a0ec48b01d3cbbdd"
308 },
309 "fe337821dfa1e9333a87720cb423add6e58c7173ecb3827f4066e25fb382aa55": {
310 "translations": {
311 "python": {
312 "source": "my_key_imported = kms.Key.from_key_arn(self, \"MyImportedKey\", \"arn:aws:...\")\n\n# you can do stuff with this imported key.\nmy_key_imported.add_alias(\"alias/foo\")",
313 "version": "2"
314 },
315 "csharp": {
316 "source": "IKey myKeyImported = Key.FromKeyArn(this, \"MyImportedKey\", \"arn:aws:...\");\n\n// you can do stuff with this imported key.\nmyKeyImported.AddAlias(\"alias/foo\");",
317 "version": "1"
318 },
319 "java": {
320 "source": "IKey myKeyImported = Key.fromKeyArn(this, \"MyImportedKey\", \"arn:aws:...\");\n\n// you can do stuff with this imported key.\nmyKeyImported.addAlias(\"alias/foo\");",
321 "version": "1"
322 },
323 "go": {
324 "source": "myKeyImported := kms.key.fromKeyArn(this, jsii.String(\"MyImportedKey\"), jsii.String(\"arn:aws:...\"))\n\n// you can do stuff with this imported key.\nmyKeyImported.addAlias(jsii.String(\"alias/foo\"))",
325 "version": "1"
326 },
327 "$": {
328 "source": "const myKeyImported = kms.Key.fromKeyArn(this, 'MyImportedKey', 'arn:aws:...');\n\n// you can do stuff with this imported key.\nmyKeyImported.addAlias('alias/foo');",
329 "version": "0"
330 }
331 },
332 "location": {
333 "api": {
334 "api": "moduleReadme",
335 "moduleFqn": "@aws-cdk/aws-kms"
336 },
337 "field": {
338 "field": "markdown",
339 "line": 103
340 }
341 },
342 "didCompile": true,
343 "fqnsReferenced": [
344 "@aws-cdk/aws-kms.IKey",
345 "@aws-cdk/aws-kms.IKey#addAlias",
346 "@aws-cdk/aws-kms.Key",
347 "@aws-cdk/aws-kms.Key#fromKeyArn",
348 "constructs.Construct"
349 ],
350 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst myKeyImported = kms.Key.fromKeyArn(this, 'MyImportedKey', 'arn:aws:...');\n\n// you can do stuff with this imported key.\nmyKeyImported.addAlias('alias/foo');\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
351 "syntaxKindCounter": {
352 "10": 3,
353 "75": 6,
354 "104": 1,
355 "194": 3,
356 "196": 2,
357 "225": 1,
358 "226": 1,
359 "242": 1,
360 "243": 1
361 },
362 "fqnsFingerprint": "aebd1fd23fa118378a3c57d3770075cec9e81d11e07e79cbdcbeb5154530e7c0"
363 },
364 "6a6f49e170bfb854b16a39acb03ce73437abb7d1d54317a535c78dc35c951efa": {
365 "translations": {
366 "python": {
367 "source": "import aws_cdk.aws_cloudtrail as cloudtrail\n\n\nmy_key_alias = kms.Alias.from_alias_name(self, \"myKey\", \"alias/aws/s3\")\ntrail = cloudtrail.Trail(self, \"myCloudTrail\",\n send_to_cloud_watch_logs=True,\n kms_key=my_key_alias\n)",
368 "version": "2"
369 },
370 "csharp": {
371 "source": "using Amazon.CDK.AWS.CloudTrail;\n\n\nIAlias myKeyAlias = Alias.FromAliasName(this, \"myKey\", \"alias/aws/s3\");\nTrail trail = new Trail(this, \"myCloudTrail\", new TrailProps {\n SendToCloudWatchLogs = true,\n KmsKey = myKeyAlias\n});",
372 "version": "1"
373 },
374 "java": {
375 "source": "import software.amazon.awscdk.services.cloudtrail.*;\n\n\nIAlias myKeyAlias = Alias.fromAliasName(this, \"myKey\", \"alias/aws/s3\");\nTrail trail = Trail.Builder.create(this, \"myCloudTrail\")\n .sendToCloudWatchLogs(true)\n .kmsKey(myKeyAlias)\n .build();",
376 "version": "1"
377 },
378 "go": {
379 "source": "import cloudtrail \"github.com/aws-samples/dummy/awscdkawscloudtrail\"\n\n\nmyKeyAlias := kms.alias.fromAliasName(this, jsii.String(\"myKey\"), jsii.String(\"alias/aws/s3\"))\ntrail := cloudtrail.NewTrail(this, jsii.String(\"myCloudTrail\"), &trailProps{\n\tsendToCloudWatchLogs: jsii.Boolean(true),\n\tkmsKey: myKeyAlias,\n})",
380 "version": "1"
381 },
382 "$": {
383 "source": "import * as cloudtrail from '@aws-cdk/aws-cloudtrail';\n\nconst myKeyAlias = kms.Alias.fromAliasName(this, 'myKey', 'alias/aws/s3');\nconst trail = new cloudtrail.Trail(this, 'myCloudTrail', {\n sendToCloudWatchLogs: true,\n kmsKey: myKeyAlias,\n});",
384 "version": "0"
385 }
386 },
387 "location": {
388 "api": {
389 "api": "moduleReadme",
390 "moduleFqn": "@aws-cdk/aws-kms"
391 },
392 "field": {
393 "field": "markdown",
394 "line": 119
395 }
396 },
397 "didCompile": true,
398 "fqnsReferenced": [
399 "@aws-cdk/aws-cloudtrail.Trail",
400 "@aws-cdk/aws-cloudtrail.TrailProps",
401 "@aws-cdk/aws-kms.Alias",
402 "@aws-cdk/aws-kms.Alias#fromAliasName",
403 "@aws-cdk/aws-kms.IAlias",
404 "@aws-cdk/aws-kms.IKey",
405 "constructs.Construct"
406 ],
407 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as cloudtrail from '@aws-cdk/aws-cloudtrail';\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst myKeyAlias = kms.Alias.fromAliasName(this, 'myKey', 'alias/aws/s3');\nconst trail = new cloudtrail.Trail(this, 'myCloudTrail', {\n sendToCloudWatchLogs: true,\n kmsKey: myKeyAlias,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
408 "syntaxKindCounter": {
409 "10": 4,
410 "75": 11,
411 "104": 2,
412 "106": 1,
413 "193": 1,
414 "194": 3,
415 "196": 1,
416 "197": 1,
417 "225": 2,
418 "242": 2,
419 "243": 2,
420 "254": 1,
421 "255": 1,
422 "256": 1,
423 "281": 2,
424 "290": 1
425 },
426 "fqnsFingerprint": "0c637c610d8ccb80e1f3a0d69646135080553889dfca624252cc612a911dc4d9"
427 },
428 "d3d6684a08caf640183a7c5ebcabc5ae550f9779fb07c5912e966e217e314a33": {
429 "translations": {
430 "python": {
431 "source": "my_key_lookup = kms.Key.from_lookup(self, \"MyKeyLookup\",\n alias_name=\"alias/KeyAlias\"\n)\n\nrole = iam.Role(self, \"MyRole\",\n assumed_by=iam.ServicePrincipal(\"lambda.amazonaws.com\")\n)\nmy_key_lookup.grant_encrypt_decrypt(role)",
432 "version": "2"
433 },
434 "csharp": {
435 "source": "IKey myKeyLookup = Key.FromLookup(this, \"MyKeyLookup\", new KeyLookupOptions {\n AliasName = \"alias/KeyAlias\"\n});\n\nRole role = new Role(this, \"MyRole\", new RoleProps {\n AssumedBy = new ServicePrincipal(\"lambda.amazonaws.com\")\n});\nmyKeyLookup.GrantEncryptDecrypt(role);",
436 "version": "1"
437 },
438 "java": {
439 "source": "IKey myKeyLookup = Key.fromLookup(this, \"MyKeyLookup\", KeyLookupOptions.builder()\n .aliasName(\"alias/KeyAlias\")\n .build());\n\nRole role = Role.Builder.create(this, \"MyRole\")\n .assumedBy(new ServicePrincipal(\"lambda.amazonaws.com\"))\n .build();\nmyKeyLookup.grantEncryptDecrypt(role);",
440 "version": "1"
441 },
442 "go": {
443 "source": "myKeyLookup := kms.key.fromLookup(this, jsii.String(\"MyKeyLookup\"), &keyLookupOptions{\n\taliasName: jsii.String(\"alias/KeyAlias\"),\n})\n\nrole := iam.NewRole(this, jsii.String(\"MyRole\"), &roleProps{\n\tassumedBy: iam.NewServicePrincipal(jsii.String(\"lambda.amazonaws.com\")),\n})\nmyKeyLookup.grantEncryptDecrypt(role)",
444 "version": "1"
445 },
446 "$": {
447 "source": "const myKeyLookup = kms.Key.fromLookup(this, 'MyKeyLookup', {\n aliasName: 'alias/KeyAlias',\n});\n\nconst role = new iam.Role(this, 'MyRole', {\n assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),\n});\nmyKeyLookup.grantEncryptDecrypt(role);",
448 "version": "0"
449 }
450 },
451 "location": {
452 "api": {
453 "api": "moduleReadme",
454 "moduleFqn": "@aws-cdk/aws-kms"
455 },
456 "field": {
457 "field": "markdown",
458 "line": 146
459 }
460 },
461 "didCompile": true,
462 "fqnsReferenced": [
463 "@aws-cdk/aws-iam.IGrantable",
464 "@aws-cdk/aws-iam.IPrincipal",
465 "@aws-cdk/aws-iam.Role",
466 "@aws-cdk/aws-iam.RoleProps",
467 "@aws-cdk/aws-iam.ServicePrincipal",
468 "@aws-cdk/aws-kms.IKey",
469 "@aws-cdk/aws-kms.IKey#grantEncryptDecrypt",
470 "@aws-cdk/aws-kms.Key",
471 "@aws-cdk/aws-kms.Key#fromLookup",
472 "@aws-cdk/aws-kms.KeyLookupOptions",
473 "constructs.Construct"
474 ],
475 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst myKeyLookup = kms.Key.fromLookup(this, 'MyKeyLookup', {\n aliasName: 'alias/KeyAlias',\n});\n\nconst role = new iam.Role(this, 'MyRole', {\n assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),\n});\nmyKeyLookup.grantEncryptDecrypt(role);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
476 "syntaxKindCounter": {
477 "10": 4,
478 "75": 14,
479 "104": 2,
480 "193": 2,
481 "194": 5,
482 "196": 2,
483 "197": 2,
484 "225": 2,
485 "226": 1,
486 "242": 2,
487 "243": 2,
488 "281": 2
489 },
490 "fqnsFingerprint": "26b3bcee08c2320d35d3665e0008627296a2fcd4b2d7aaf4e601367fbcf34bbd"
491 },
492 "d13662c3a69e47308b1f2a3294ff1820099daece484aca2e49d9d31e56e5268c": {
493 "translations": {
494 "python": {
495 "source": "kms.Key(self, \"MyKey\", trust_account_identities=True)",
496 "version": "2"
497 },
498 "csharp": {
499 "source": "new Key(this, \"MyKey\", new KeyProps { TrustAccountIdentities = true });",
500 "version": "1"
501 },
502 "java": {
503 "source": "Key.Builder.create(this, \"MyKey\").trustAccountIdentities(true).build();",
504 "version": "1"
505 },
506 "go": {
507 "source": "kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\ttrustAccountIdentities: jsii.Boolean(true),\n})",
508 "version": "1"
509 },
510 "$": {
511 "source": "new kms.Key(this, 'MyKey', { trustAccountIdentities: true });",
512 "version": "0"
513 }
514 },
515 "location": {
516 "api": {
517 "api": "moduleReadme",
518 "moduleFqn": "@aws-cdk/aws-kms"
519 },
520 "field": {
521 "field": "markdown",
522 "line": 175
523 }
524 },
525 "didCompile": true,
526 "fqnsReferenced": [
527 "@aws-cdk/aws-kms.Key",
528 "@aws-cdk/aws-kms.KeyProps",
529 "constructs.Construct"
530 ],
531 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nnew kms.Key(this, 'MyKey', { trustAccountIdentities: true });\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
532 "syntaxKindCounter": {
533 "10": 1,
534 "75": 3,
535 "104": 1,
536 "106": 1,
537 "193": 1,
538 "194": 1,
539 "197": 1,
540 "226": 1,
541 "281": 1
542 },
543 "fqnsFingerprint": "0916683fae71d7975297147cfff0b1a17e9636759086d074aba647a1c232945c"
544 },
545 "1cbc37414aaf63842ec625d105c85480d31650ed3283d25dc08ba2b1f3813f4a": {
546 "translations": {
547 "python": {
548 "source": "key = kms.Key(self, \"MyKey\")\nuser = iam.User(self, \"MyUser\")\nkey.grant_encrypt(user)",
549 "version": "2"
550 },
551 "csharp": {
552 "source": "Key key = new Key(this, \"MyKey\");\nUser user = new User(this, \"MyUser\");\nkey.GrantEncrypt(user);",
553 "version": "1"
554 },
555 "java": {
556 "source": "Key key = new Key(this, \"MyKey\");\nUser user = new User(this, \"MyUser\");\nkey.grantEncrypt(user);",
557 "version": "1"
558 },
559 "go": {
560 "source": "key := kms.NewKey(this, jsii.String(\"MyKey\"))\nuser := iam.NewUser(this, jsii.String(\"MyUser\"))\nkey.grantEncrypt(user)",
561 "version": "1"
562 },
563 "$": {
564 "source": "const key = new kms.Key(this, 'MyKey');\nconst user = new iam.User(this, 'MyUser');\nkey.grantEncrypt(user); // Adds encrypt permissions to user policy; key policy is unmodified.",
565 "version": "0"
566 }
567 },
568 "location": {
569 "api": {
570 "api": "moduleReadme",
571 "moduleFqn": "@aws-cdk/aws-kms"
572 },
573 "field": {
574 "field": "markdown",
575 "line": 195
576 }
577 },
578 "didCompile": true,
579 "fqnsReferenced": [
580 "@aws-cdk/aws-iam.IGrantable",
581 "@aws-cdk/aws-iam.User",
582 "@aws-cdk/aws-kms.Key",
583 "constructs.Construct"
584 ],
585 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst key = new kms.Key(this, 'MyKey');\nconst user = new iam.User(this, 'MyUser');\nkey.grantEncrypt(user);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
586 "syntaxKindCounter": {
587 "10": 2,
588 "75": 9,
589 "104": 2,
590 "194": 3,
591 "196": 1,
592 "197": 2,
593 "225": 2,
594 "226": 1,
595 "242": 2,
596 "243": 2
597 },
598 "fqnsFingerprint": "2e2ce15bddd101571710485cad6924dc533901cbf96d6480866b6fe198bb18a3"
599 },
600 "83548013773869deaaff419520eff5f6a8184d387e76d7562ae68d16e4af0ad5": {
601 "translations": {
602 "python": {
603 "source": "my_trusted_admin_role = iam.Role.from_role_arn(self, \"TrustedRole\", \"arn:aws:iam:....\")\nkey = kms.Key(self, \"MyKey\",\n admins=[my_trusted_admin_role]\n)\n\nsecond_key = kms.Key(self, \"MyKey2\")\nsecond_key.grant_admin(my_trusted_admin_role)",
604 "version": "2"
605 },
606 "csharp": {
607 "source": "IRole myTrustedAdminRole = Role.FromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\nKey key = new Key(this, \"MyKey\", new KeyProps {\n Admins = new [] { myTrustedAdminRole }\n});\n\nKey secondKey = new Key(this, \"MyKey2\");\nsecondKey.GrantAdmin(myTrustedAdminRole);",
608 "version": "1"
609 },
610 "java": {
611 "source": "IRole myTrustedAdminRole = Role.fromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\nKey key = Key.Builder.create(this, \"MyKey\")\n .admins(List.of(myTrustedAdminRole))\n .build();\n\nKey secondKey = new Key(this, \"MyKey2\");\nsecondKey.grantAdmin(myTrustedAdminRole);",
612 "version": "1"
613 },
614 "go": {
615 "source": "myTrustedAdminRole := iam.role.fromRoleArn(this, jsii.String(\"TrustedRole\"), jsii.String(\"arn:aws:iam:....\"))\nkey := kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\tadmins: []iPrincipal{\n\t\tmyTrustedAdminRole,\n\t},\n})\n\nsecondKey := kms.NewKey(this, jsii.String(\"MyKey2\"))\nsecondKey.grantAdmin(myTrustedAdminRole)",
616 "version": "1"
617 },
618 "$": {
619 "source": "const myTrustedAdminRole = iam.Role.fromRoleArn(this, 'TrustedRole', 'arn:aws:iam:....');\nconst key = new kms.Key(this, 'MyKey', {\n admins: [myTrustedAdminRole],\n});\n\nconst secondKey = new kms.Key(this, 'MyKey2');\nsecondKey.grantAdmin(myTrustedAdminRole);",
620 "version": "0"
621 }
622 },
623 "location": {
624 "api": {
625 "api": "moduleReadme",
626 "moduleFqn": "@aws-cdk/aws-kms"
627 },
628 "field": {
629 "field": "markdown",
630 "line": 214
631 }
632 },
633 "didCompile": true,
634 "fqnsReferenced": [
635 "@aws-cdk/aws-iam.IGrantable",
636 "@aws-cdk/aws-iam.IRole",
637 "@aws-cdk/aws-iam.Role",
638 "@aws-cdk/aws-iam.Role#fromRoleArn",
639 "@aws-cdk/aws-kms.Key",
640 "@aws-cdk/aws-kms.Key#grantAdmin",
641 "@aws-cdk/aws-kms.KeyProps",
642 "constructs.Construct"
643 ],
644 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst myTrustedAdminRole = iam.Role.fromRoleArn(this, 'TrustedRole', 'arn:aws:iam:....');\nconst key = new kms.Key(this, 'MyKey', {\n admins: [myTrustedAdminRole],\n});\n\nconst secondKey = new kms.Key(this, 'MyKey2');\nsecondKey.grantAdmin(myTrustedAdminRole);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
645 "syntaxKindCounter": {
646 "10": 4,
647 "75": 15,
648 "104": 3,
649 "192": 1,
650 "193": 1,
651 "194": 5,
652 "196": 2,
653 "197": 2,
654 "225": 3,
655 "226": 1,
656 "242": 3,
657 "243": 3,
658 "281": 1
659 },
660 "fqnsFingerprint": "7a3298ce5529316fdff2b5611008cbb97888d3219c6b92a1a69f6c7cae2dab82"
661 },
662 "67ad2cd93fdfe3e3ec88fb2f373db52724c88e5880e689727c54295c38237296": {
663 "translations": {
664 "python": {
665 "source": "my_trusted_admin_role = iam.Role.from_role_arn(self, \"TrustedRole\", \"arn:aws:iam:....\")\n# Creates a limited admin policy and assigns to the account root.\nmy_custom_policy = iam.PolicyDocument(\n statements=[iam.PolicyStatement(\n actions=[\"kms:Create*\", \"kms:Describe*\", \"kms:Enable*\", \"kms:List*\", \"kms:Put*\"\n ],\n principals=[iam.AccountRootPrincipal()],\n resources=[\"*\"]\n )]\n)\nkey = kms.Key(self, \"MyKey\",\n policy=my_custom_policy\n)",
666 "version": "2"
667 },
668 "csharp": {
669 "source": "IRole myTrustedAdminRole = Role.FromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\n// Creates a limited admin policy and assigns to the account root.\nPolicyDocument myCustomPolicy = new PolicyDocument(new PolicyDocumentProps {\n Statements = new [] { new PolicyStatement(new PolicyStatementProps {\n Actions = new [] { \"kms:Create*\", \"kms:Describe*\", \"kms:Enable*\", \"kms:List*\", \"kms:Put*\" },\n Principals = new [] { new AccountRootPrincipal() },\n Resources = new [] { \"*\" }\n }) }\n});\nKey key = new Key(this, \"MyKey\", new KeyProps {\n Policy = myCustomPolicy\n});",
670 "version": "1"
671 },
672 "java": {
673 "source": "IRole myTrustedAdminRole = Role.fromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\n// Creates a limited admin policy and assigns to the account root.\nPolicyDocument myCustomPolicy = PolicyDocument.Builder.create()\n .statements(List.of(PolicyStatement.Builder.create()\n .actions(List.of(\"kms:Create*\", \"kms:Describe*\", \"kms:Enable*\", \"kms:List*\", \"kms:Put*\"))\n .principals(List.of(new AccountRootPrincipal()))\n .resources(List.of(\"*\"))\n .build()))\n .build();\nKey key = Key.Builder.create(this, \"MyKey\")\n .policy(myCustomPolicy)\n .build();",
674 "version": "1"
675 },
676 "go": {
677 "source": "myTrustedAdminRole := iam.role.fromRoleArn(this, jsii.String(\"TrustedRole\"), jsii.String(\"arn:aws:iam:....\"))\n// Creates a limited admin policy and assigns to the account root.\nmyCustomPolicy := iam.NewPolicyDocument(&policyDocumentProps{\n\tstatements: []policyStatement{\n\t\tiam.NewPolicyStatement(&policyStatementProps{\n\t\t\tactions: []*string{\n\t\t\t\tjsii.String(\"kms:Create*\"),\n\t\t\t\tjsii.String(\"kms:Describe*\"),\n\t\t\t\tjsii.String(\"kms:Enable*\"),\n\t\t\t\tjsii.String(\"kms:List*\"),\n\t\t\t\tjsii.String(\"kms:Put*\"),\n\t\t\t},\n\t\t\tprincipals: []iPrincipal{\n\t\t\t\tiam.NewAccountRootPrincipal(),\n\t\t\t},\n\t\t\tresources: []*string{\n\t\t\t\tjsii.String(\"*\"),\n\t\t\t},\n\t\t}),\n\t},\n})\nkey := kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\tpolicy: myCustomPolicy,\n})",
678 "version": "1"
679 },
680 "$": {
681 "source": "const myTrustedAdminRole = iam.Role.fromRoleArn(this, 'TrustedRole', 'arn:aws:iam:....');\n// Creates a limited admin policy and assigns to the account root.\nconst myCustomPolicy = new iam.PolicyDocument({\n statements: [new iam.PolicyStatement({\n actions: [\n 'kms:Create*',\n 'kms:Describe*',\n 'kms:Enable*',\n 'kms:List*',\n 'kms:Put*',\n ],\n principals: [new iam.AccountRootPrincipal()],\n resources: ['*'],\n })],\n});\nconst key = new kms.Key(this, 'MyKey', {\n policy: myCustomPolicy,\n});",
682 "version": "0"
683 }
684 },
685 "location": {
686 "api": {
687 "api": "moduleReadme",
688 "moduleFqn": "@aws-cdk/aws-kms"
689 },
690 "field": {
691 "field": "markdown",
692 "line": 230
693 }
694 },
695 "didCompile": true,
696 "fqnsReferenced": [
697 "@aws-cdk/aws-iam.AccountRootPrincipal",
698 "@aws-cdk/aws-iam.IRole",
699 "@aws-cdk/aws-iam.PolicyDocument",
700 "@aws-cdk/aws-iam.PolicyDocumentProps",
701 "@aws-cdk/aws-iam.PolicyStatement",
702 "@aws-cdk/aws-iam.PolicyStatementProps",
703 "@aws-cdk/aws-iam.Role",
704 "@aws-cdk/aws-iam.Role#fromRoleArn",
705 "@aws-cdk/aws-kms.Key",
706 "@aws-cdk/aws-kms.KeyProps",
707 "constructs.Construct"
708 ],
709 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst myTrustedAdminRole = iam.Role.fromRoleArn(this, 'TrustedRole', 'arn:aws:iam:....');\n// Creates a limited admin policy and assigns to the account root.\nconst myCustomPolicy = new iam.PolicyDocument({\n statements: [new iam.PolicyStatement({\n actions: [\n 'kms:Create*',\n 'kms:Describe*',\n 'kms:Enable*',\n 'kms:List*',\n 'kms:Put*',\n ],\n principals: [new iam.AccountRootPrincipal()],\n resources: ['*'],\n })],\n});\nconst key = new kms.Key(this, 'MyKey', {\n policy: myCustomPolicy,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
710 "syntaxKindCounter": {
711 "10": 9,
712 "75": 20,
713 "104": 2,
714 "192": 4,
715 "193": 3,
716 "194": 6,
717 "196": 1,
718 "197": 4,
719 "225": 3,
720 "242": 3,
721 "243": 3,
722 "281": 5
723 },
724 "fqnsFingerprint": "934404f881a4076b95e1653ee0ba8630dc2e38b336a690d4f27debcc1059e395"
725 },
726 "26ebf12061946d80c1a4c164b44540bc795645fcdeb943e9d99220280ca7c4fc": {
727 "translations": {
728 "python": {
729 "source": "# Passing an encrypted replication bucket created in a different stack.\napp = App()\nreplication_stack = Stack(app, \"ReplicationStack\",\n env=Environment(\n region=\"us-west-1\"\n )\n)\nkey = kms.Key(replication_stack, \"ReplicationKey\")\nalias = kms.Alias(replication_stack, \"ReplicationAlias\",\n # aliasName is required\n alias_name=PhysicalName.GENERATE_IF_NEEDED,\n target_key=key\n)\nreplication_bucket = s3.Bucket(replication_stack, \"ReplicationBucket\",\n bucket_name=PhysicalName.GENERATE_IF_NEEDED,\n encryption_key=alias\n)",
730 "version": "2"
731 },
732 "csharp": {
733 "source": "// Passing an encrypted replication bucket created in a different stack.\nApp app = new App();\nStack replicationStack = new Stack(app, \"ReplicationStack\", new StackProps {\n Env = new Environment {\n Region = \"us-west-1\"\n }\n});\nKey key = new Key(replicationStack, \"ReplicationKey\");\nAlias alias = new Alias(replicationStack, \"ReplicationAlias\", new AliasProps {\n // aliasName is required\n AliasName = PhysicalName.GENERATE_IF_NEEDED,\n TargetKey = key\n});\nBucket replicationBucket = new Bucket(replicationStack, \"ReplicationBucket\", new BucketProps {\n BucketName = PhysicalName.GENERATE_IF_NEEDED,\n EncryptionKey = alias\n});",
734 "version": "1"
735 },
736 "java": {
737 "source": "// Passing an encrypted replication bucket created in a different stack.\nApp app = new App();\nStack replicationStack = Stack.Builder.create(app, \"ReplicationStack\")\n .env(Environment.builder()\n .region(\"us-west-1\")\n .build())\n .build();\nKey key = new Key(replicationStack, \"ReplicationKey\");\nAlias alias = Alias.Builder.create(replicationStack, \"ReplicationAlias\")\n // aliasName is required\n .aliasName(PhysicalName.GENERATE_IF_NEEDED)\n .targetKey(key)\n .build();\nBucket replicationBucket = Bucket.Builder.create(replicationStack, \"ReplicationBucket\")\n .bucketName(PhysicalName.GENERATE_IF_NEEDED)\n .encryptionKey(alias)\n .build();",
738 "version": "1"
739 },
740 "go": {
741 "source": "// Passing an encrypted replication bucket created in a different stack.\napp := awscdkcore.NewApp()\nreplicationStack := awscdkcore.Newstack(app, jsii.String(\"ReplicationStack\"), &stackProps{\n\tenv: &environment{\n\t\tregion: jsii.String(\"us-west-1\"),\n\t},\n})\nkey := kms.NewKey(replicationStack, jsii.String(\"ReplicationKey\"))\nalias := kms.NewAlias(replicationStack, jsii.String(\"ReplicationAlias\"), &aliasProps{\n\t// aliasName is required\n\taliasName: *awscdkcore.PhysicalName_GENERATE_IF_NEEDED(),\n\ttargetKey: key,\n})\nreplicationBucket := s3.NewBucket(replicationStack, jsii.String(\"ReplicationBucket\"), &bucketProps{\n\tbucketName: *awscdkcore.PhysicalName_GENERATE_IF_NEEDED(),\n\tencryptionKey: alias,\n})",
742 "version": "1"
743 },
744 "$": {
745 "source": "// Passing an encrypted replication bucket created in a different stack.\nconst app = new App();\nconst replicationStack = new Stack(app, 'ReplicationStack', {\n env: {\n region: 'us-west-1',\n },\n});\nconst key = new kms.Key(replicationStack, 'ReplicationKey');\nconst alias = new kms.Alias(replicationStack, 'ReplicationAlias', {\n // aliasName is required\n aliasName: PhysicalName.GENERATE_IF_NEEDED,\n targetKey: key,\n});\nconst replicationBucket = new s3.Bucket(replicationStack, 'ReplicationBucket', {\n bucketName: PhysicalName.GENERATE_IF_NEEDED,\n encryptionKey: alias,\n});",
746 "version": "0"
747 }
748 },
749 "location": {
750 "api": {
751 "api": "type",
752 "fqn": "@aws-cdk/aws-kms.Alias"
753 },
754 "field": {
755 "field": "example"
756 }
757 },
758 "didCompile": true,
759 "fqnsReferenced": [
760 "@aws-cdk/aws-kms.Alias",
761 "@aws-cdk/aws-kms.AliasProps",
762 "@aws-cdk/aws-kms.IKey",
763 "@aws-cdk/aws-kms.Key",
764 "@aws-cdk/aws-s3.Bucket",
765 "@aws-cdk/aws-s3.BucketProps",
766 "@aws-cdk/core.App",
767 "@aws-cdk/core.Environment",
768 "@aws-cdk/core.PhysicalName#GENERATE_IF_NEEDED",
769 "@aws-cdk/core.Stack",
770 "@aws-cdk/core.StackProps",
771 "constructs.Construct"
772 ],
773 "fullSource": "import { Construct } from 'constructs';\nimport { App, Duration, PhysicalName, Stack } from '@aws-cdk/core';\nimport * as codepipeline from '@aws-cdk/aws-codepipeline';\nimport * as codepipeline_actions from '@aws-cdk/aws-codepipeline-actions';\nimport * as s3 from '@aws-cdk/aws-s3';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as kms from '@aws-cdk/aws-kms';\n\nclass Context extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n// Passing an encrypted replication bucket created in a different stack.\nconst app = new App();\nconst replicationStack = new Stack(app, 'ReplicationStack', {\n env: {\n region: 'us-west-1',\n },\n});\nconst key = new kms.Key(replicationStack, 'ReplicationKey');\nconst alias = new kms.Alias(replicationStack, 'ReplicationAlias', {\n // aliasName is required\n aliasName: PhysicalName.GENERATE_IF_NEEDED,\n targetKey: key,\n});\nconst replicationBucket = new s3.Bucket(replicationStack, 'ReplicationBucket', {\n bucketName: PhysicalName.GENERATE_IF_NEEDED,\n encryptionKey: alias,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
774 "syntaxKindCounter": {
775 "10": 5,
776 "75": 29,
777 "193": 4,
778 "194": 5,
779 "197": 5,
780 "225": 5,
781 "242": 5,
782 "243": 5,
783 "281": 6
784 },
785 "fqnsFingerprint": "2d48719e0d496742cfc083acd40ed56b694a7203eb571c89489f1cdffd1cbb79"
786 },
787 "124483fdd22883535ad422f403294df9e329b51d6e11a85590ea300e82d8d56f": {
788 "translations": {
789 "python": {
790 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_kms as kms\n\n# key: kms.Key\n\nalias_attributes = kms.AliasAttributes(\n alias_name=\"aliasName\",\n alias_target_key=key\n)",
791 "version": "2"
792 },
793 "csharp": {
794 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.KMS;\n\nKey key;\n\nAliasAttributes aliasAttributes = new AliasAttributes {\n AliasName = \"aliasName\",\n AliasTargetKey = key\n};",
795 "version": "1"
796 },
797 "java": {
798 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.kms.*;\n\nKey key;\n\nAliasAttributes aliasAttributes = AliasAttributes.builder()\n .aliasName(\"aliasName\")\n .aliasTargetKey(key)\n .build();",
799 "version": "1"
800 },
801 "go": {
802 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\nvar key key\n\naliasAttributes := &aliasAttributes{\n\taliasName: jsii.String(\"aliasName\"),\n\taliasTargetKey: key,\n}",
803 "version": "1"
804 },
805 "$": {
806 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const key: kms.Key;\nconst aliasAttributes: kms.AliasAttributes = {\n aliasName: 'aliasName',\n aliasTargetKey: key,\n};",
807 "version": "0"
808 }
809 },
810 "location": {
811 "api": {
812 "api": "type",
813 "fqn": "@aws-cdk/aws-kms.AliasAttributes"
814 },
815 "field": {
816 "field": "example"
817 }
818 },
819 "didCompile": true,
820 "fqnsReferenced": [
821 "@aws-cdk/aws-kms.AliasAttributes",
822 "@aws-cdk/aws-kms.IKey"
823 ],
824 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const key: kms.Key;\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst aliasAttributes: kms.AliasAttributes = {\n aliasName: 'aliasName',\n aliasTargetKey: key,\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
825 "syntaxKindCounter": {
826 "10": 2,
827 "75": 10,
828 "130": 1,
829 "153": 2,
830 "169": 2,
831 "193": 1,
832 "225": 2,
833 "242": 2,
834 "243": 2,
835 "254": 1,
836 "255": 1,
837 "256": 1,
838 "281": 2,
839 "290": 1
840 },
841 "fqnsFingerprint": "7e7bdea4241afdd79697721fc792f3ca5649862ab580c53a731874c707ed66ef"
842 },
843 "d02e1f802b3da980d2a0bd8f7642d401fc95790f1aad43525ba11a22f961a7ca": {
844 "translations": {
845 "python": {
846 "source": "#\n# Stack that defines the key\n#\nclass KeyStack(cdk.Stack):\n\n def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):\n super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)\n self.key = kms.Key(self, \"MyKey\", removal_policy=cdk.RemovalPolicy.DESTROY)\n\n#\n# Stack that uses the key\n#\nclass UseStack(cdk.Stack):\n def __init__(self, scope, id, *, key, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):\n super().__init__(scope, id, key=key, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)\n\n # Use the IKey object here.\n kms.Alias(self, \"Alias\",\n alias_name=\"alias/foo\",\n target_key=key\n )\n\nkey_stack = KeyStack(app, \"KeyStack\")\nUseStack(app, \"UseStack\", key=key_stack.key)",
847 "version": "2"
848 },
849 "csharp": {
850 "source": "/**\n * Stack that defines the key\n */\nclass KeyStack : Stack\n{\n public Key Key { get; }\n\n public KeyStack(App scope, string id, StackProps? props=null) : base(scope, id, props)\n {\n Key = new Key(this, \"MyKey\", new KeyProps { RemovalPolicy = RemovalPolicy.DESTROY });\n }\n}\n\nclass UseStackProps : StackProps\n{\n public IKey Key { get; set; }\n}\n\n/**\n * Stack that uses the key\n */\nclass UseStack : Stack\n{\n public UseStack(App scope, string id, UseStackProps props) : base(scope, id, props)\n {\n\n // Use the IKey object here.\n // Use the IKey object here.\n new Alias(this, \"Alias\", new AliasProps {\n AliasName = \"alias/foo\",\n TargetKey = props.Key\n });\n }\n}\n\nKeyStack keyStack = new KeyStack(app, \"KeyStack\");\nnew UseStack(app, \"UseStack\", new UseStackProps { Key = keyStack.Key });",
851 "version": "1"
852 },
853 "java": {
854 "source": "/**\n * Stack that defines the key\n */\npublic class KeyStack extends Stack {\n public final Key key;\n\n public KeyStack(App scope, String id) {\n this(scope, id, null);\n }\n\n public KeyStack(App scope, String id, StackProps props) {\n super(scope, id, props);\n this.key = Key.Builder.create(this, \"MyKey\").removalPolicy(RemovalPolicy.DESTROY).build();\n }\n}\n\npublic class UseStackProps extends StackProps {\n private IKey key;\n public IKey getKey() {\n return this.key;\n }\n public UseStackProps key(IKey key) {\n this.key = key;\n return this;\n }\n}\n\n/**\n * Stack that uses the key\n */\npublic class UseStack extends Stack {\n public UseStack(App scope, String id, UseStackProps props) {\n super(scope, id, props);\n\n // Use the IKey object here.\n // Use the IKey object here.\n Alias.Builder.create(this, \"Alias\")\n .aliasName(\"alias/foo\")\n .targetKey(props.getKey())\n .build();\n }\n}\n\nKeyStack keyStack = new KeyStack(app, \"KeyStack\");\nnew UseStack(app, \"UseStack\", new UseStackProps().key(keyStack.getKey()));",
855 "version": "1"
856 },
857 "go": {
858 "source": "/**\n * Stack that defines the key\n */\ntype keyStack struct {\n\tstack\n\tkey key\n}\n\nfunc newKeyStack(scope app, id *string, props stackProps) *keyStack {\n\tthis := &keyStack{}\n\tcdk.NewStack_Override(this, scope, id, props)\n\tthis.key = kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\t\tremovalPolicy: cdk.removalPolicy_DESTROY,\n\t})\n\treturn this\n}\n\ntype useStackProps struct {\n\tstackProps\n\tkey iKey\n}\n\n/**\n * Stack that uses the key\n */\ntype useStack struct {\n\tstack\n}\n\nfunc newUseStack(scope app, id *string, props useStackProps) *useStack {\n\tthis := &useStack{}\n\tcdk.NewStack_Override(this, scope, id, props)\n\n\t// Use the IKey object here.\n\t// Use the IKey object here.\n\tkms.NewAlias(this, jsii.String(\"Alias\"), &aliasProps{\n\t\taliasName: jsii.String(\"alias/foo\"),\n\t\ttargetKey: props.key,\n\t})\n\treturn this\n}\n\nkeyStack := NewKeyStack(app, jsii.String(\"KeyStack\"))\nNewUseStack(app, jsii.String(\"UseStack\"), &useStackProps{\n\tkey: keyStack.key,\n})",
859 "version": "1"
860 },
861 "$": {
862 "source": "\n/**\n * Stack that defines the key\n */\nclass KeyStack extends cdk.Stack {\n public readonly key: kms.Key;\n\n constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {\n super(scope, id, props);\n this.key = new kms.Key(this, 'MyKey', { removalPolicy: cdk.RemovalPolicy.DESTROY });\n }\n}\n\ninterface UseStackProps extends cdk.StackProps {\n key: kms.IKey; // Use IKey here\n}\n\n/**\n * Stack that uses the key\n */\nclass UseStack extends cdk.Stack {\n constructor(scope: cdk.App, id: string, props: UseStackProps) {\n super(scope, id, props);\n\n // Use the IKey object here.\n new kms.Alias(this, 'Alias', {\n aliasName: 'alias/foo',\n targetKey: props.key,\n });\n }\n}\n\nconst keyStack = new KeyStack(app, 'KeyStack');\nnew UseStack(app, 'UseStack', { key: keyStack.key });",
863 "version": "0"
864 }
865 },
866 "location": {
867 "api": {
868 "api": "type",
869 "fqn": "@aws-cdk/aws-kms.AliasProps"
870 },
871 "field": {
872 "field": "example"
873 }
874 },
875 "didCompile": true,
876 "fqnsReferenced": [
877 "@aws-cdk/aws-kms.Alias",
878 "@aws-cdk/aws-kms.AliasProps",
879 "@aws-cdk/aws-kms.IKey",
880 "@aws-cdk/aws-kms.Key",
881 "@aws-cdk/aws-kms.KeyProps",
882 "@aws-cdk/core.App",
883 "@aws-cdk/core.RemovalPolicy",
884 "@aws-cdk/core.RemovalPolicy#DESTROY",
885 "@aws-cdk/core.Stack",
886 "@aws-cdk/core.StackProps",
887 "constructs.Construct"
888 ],
889 "fullSource": "/// !cdk-integ *\nimport * as cdk from '@aws-cdk/core';\nimport * as kms from '../lib';\n\nconst app = new cdk.App();\n\n/// !show\n\n/**\n * Stack that defines the key\n */\nclass KeyStack extends cdk.Stack {\n public readonly key: kms.Key;\n\n constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {\n super(scope, id, props);\n this.key = new kms.Key(this, 'MyKey', { removalPolicy: cdk.RemovalPolicy.DESTROY });\n }\n}\n\ninterface UseStackProps extends cdk.StackProps {\n key: kms.IKey; // Use IKey here\n}\n\n/**\n * Stack that uses the key\n */\nclass UseStack extends cdk.Stack {\n constructor(scope: cdk.App, id: string, props: UseStackProps) {\n super(scope, id, props);\n\n // Use the IKey object here.\n new kms.Alias(this, 'Alias', {\n aliasName: 'alias/foo',\n targetKey: props.key,\n });\n }\n}\n\nconst keyStack = new KeyStack(app, 'KeyStack');\nnew UseStack(app, 'UseStack', { key: keyStack.key });\n/// !hide\n\napp.synth();\n",
890 "syntaxKindCounter": {
891 "10": 5,
892 "57": 1,
893 "62": 1,
894 "75": 55,
895 "102": 2,
896 "104": 3,
897 "119": 1,
898 "138": 1,
899 "143": 2,
900 "153": 5,
901 "156": 6,
902 "158": 1,
903 "159": 1,
904 "162": 2,
905 "169": 6,
906 "193": 3,
907 "194": 10,
908 "196": 2,
909 "197": 4,
910 "209": 1,
911 "216": 3,
912 "223": 2,
913 "225": 1,
914 "226": 5,
915 "242": 1,
916 "243": 1,
917 "245": 2,
918 "246": 1,
919 "279": 3,
920 "281": 4
921 },
922 "fqnsFingerprint": "dc71a585e1b7712ce79e1bf6ccb15a9dfec364ea15d88ab0a0ec48b01d3cbbdd"
923 },
924 "23462962e75342ccc2cf7daccda75520a17ffa440b12c9d8ca4b842bd2223c0a": {
925 "translations": {
926 "python": {
927 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_kms as kms\n\ncfn_alias = kms.CfnAlias(self, \"MyCfnAlias\",\n alias_name=\"aliasName\",\n target_key_id=\"targetKeyId\"\n)",
928 "version": "2"
929 },
930 "csharp": {
931 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.KMS;\n\nCfnAlias cfnAlias = new CfnAlias(this, \"MyCfnAlias\", new CfnAliasProps {\n AliasName = \"aliasName\",\n TargetKeyId = \"targetKeyId\"\n});",
932 "version": "1"
933 },
934 "java": {
935 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.kms.*;\n\nCfnAlias cfnAlias = CfnAlias.Builder.create(this, \"MyCfnAlias\")\n .aliasName(\"aliasName\")\n .targetKeyId(\"targetKeyId\")\n .build();",
936 "version": "1"
937 },
938 "go": {
939 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\ncfnAlias := kms.NewCfnAlias(this, jsii.String(\"MyCfnAlias\"), &cfnAliasProps{\n\taliasName: jsii.String(\"aliasName\"),\n\ttargetKeyId: jsii.String(\"targetKeyId\"),\n})",
940 "version": "1"
941 },
942 "$": {
943 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\nconst cfnAlias = new kms.CfnAlias(this, 'MyCfnAlias', {\n aliasName: 'aliasName',\n targetKeyId: 'targetKeyId',\n});",
944 "version": "0"
945 }
946 },
947 "location": {
948 "api": {
949 "api": "type",
950 "fqn": "@aws-cdk/aws-kms.CfnAlias"
951 },
952 "field": {
953 "field": "example"
954 }
955 },
956 "didCompile": true,
957 "fqnsReferenced": [
958 "@aws-cdk/aws-kms.CfnAlias",
959 "@aws-cdk/aws-kms.CfnAliasProps",
960 "@aws-cdk/core.Construct"
961 ],
962 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst cfnAlias = new kms.CfnAlias(this, 'MyCfnAlias', {\n aliasName: 'aliasName',\n targetKeyId: 'targetKeyId',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
963 "syntaxKindCounter": {
964 "10": 4,
965 "75": 6,
966 "104": 1,
967 "193": 1,
968 "194": 1,
969 "197": 1,
970 "225": 1,
971 "242": 1,
972 "243": 1,
973 "254": 1,
974 "255": 1,
975 "256": 1,
976 "281": 2,
977 "290": 1
978 },
979 "fqnsFingerprint": "6426b27be06797da63b07ccc0b754069065bbee218877aa17e64e9fd45f16163"
980 },
981 "e4237c1da50d4ee2236fceb42eff1a7bb6dbe664ba4741623c4d3607e347a1f7": {
982 "translations": {
983 "python": {
984 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_kms as kms\n\ncfn_alias_props = kms.CfnAliasProps(\n alias_name=\"aliasName\",\n target_key_id=\"targetKeyId\"\n)",
985 "version": "2"
986 },
987 "csharp": {
988 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.KMS;\n\nCfnAliasProps cfnAliasProps = new CfnAliasProps {\n AliasName = \"aliasName\",\n TargetKeyId = \"targetKeyId\"\n};",
989 "version": "1"
990 },
991 "java": {
992 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.kms.*;\n\nCfnAliasProps cfnAliasProps = CfnAliasProps.builder()\n .aliasName(\"aliasName\")\n .targetKeyId(\"targetKeyId\")\n .build();",
993 "version": "1"
994 },
995 "go": {
996 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\ncfnAliasProps := &cfnAliasProps{\n\taliasName: jsii.String(\"aliasName\"),\n\ttargetKeyId: jsii.String(\"targetKeyId\"),\n}",
997 "version": "1"
998 },
999 "$": {
1000 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\nconst cfnAliasProps: kms.CfnAliasProps = {\n aliasName: 'aliasName',\n targetKeyId: 'targetKeyId',\n};",
1001 "version": "0"
1002 }
1003 },
1004 "location": {
1005 "api": {
1006 "api": "type",
1007 "fqn": "@aws-cdk/aws-kms.CfnAliasProps"
1008 },
1009 "field": {
1010 "field": "example"
1011 }
1012 },
1013 "didCompile": true,
1014 "fqnsReferenced": [
1015 "@aws-cdk/aws-kms.CfnAliasProps"
1016 ],
1017 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst cfnAliasProps: kms.CfnAliasProps = {\n aliasName: 'aliasName',\n targetKeyId: 'targetKeyId',\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1018 "syntaxKindCounter": {
1019 "10": 3,
1020 "75": 6,
1021 "153": 1,
1022 "169": 1,
1023 "193": 1,
1024 "225": 1,
1025 "242": 1,
1026 "243": 1,
1027 "254": 1,
1028 "255": 1,
1029 "256": 1,
1030 "281": 2,
1031 "290": 1
1032 },
1033 "fqnsFingerprint": "977987add69c5a3950dc3dd453069493c136f4780785c744bc1d763bafd92aaa"
1034 },
1035 "384855e413cbc1758bb53ec54e4bb9e10c54a4209f2730d1ba6386572691216c": {
1036 "translations": {
1037 "python": {
1038 "source": "# cfn_template: cfn_inc.CfnInclude\n\ncfn_key = cfn_template.get_resource(\"Key\")\nkey = kms.Key.from_cfn_key(cfn_key)",
1039 "version": "2"
1040 },
1041 "csharp": {
1042 "source": "CfnInclude cfnTemplate;\n\nCfnKey cfnKey = (CfnKey)cfnTemplate.GetResource(\"Key\");\nIKey key = Key.FromCfnKey(cfnKey);",
1043 "version": "1"
1044 },
1045 "java": {
1046 "source": "CfnInclude cfnTemplate;\n\nCfnKey cfnKey = (CfnKey)cfnTemplate.getResource(\"Key\");\nIKey key = Key.fromCfnKey(cfnKey);",
1047 "version": "1"
1048 },
1049 "go": {
1050 "source": "var cfnTemplate cfnInclude\n\ncfnKey := cfnTemplate.getResource(jsii.String(\"Key\")).(cfnKey)\nkey := kms.key.fromCfnKey(cfnKey)",
1051 "version": "1"
1052 },
1053 "$": {
1054 "source": "declare const cfnTemplate: cfn_inc.CfnInclude;\nconst cfnKey = cfnTemplate.getResource('Key') as kms.CfnKey;\nconst key = kms.Key.fromCfnKey(cfnKey);",
1055 "version": "0"
1056 }
1057 },
1058 "location": {
1059 "api": {
1060 "api": "type",
1061 "fqn": "@aws-cdk/aws-kms.CfnKey"
1062 },
1063 "field": {
1064 "field": "example"
1065 }
1066 },
1067 "didCompile": true,
1068 "fqnsReferenced": [
1069 "@aws-cdk/aws-kms.CfnKey",
1070 "@aws-cdk/aws-kms.IKey",
1071 "@aws-cdk/aws-kms.Key",
1072 "@aws-cdk/aws-kms.Key#fromCfnKey",
1073 "@aws-cdk/cloudformation-include.CfnInclude#getResource"
1074 ],
1075 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const cfnTemplate: cfn_inc.CfnInclude;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from '@aws-cdk/core';\nimport * as core from '@aws-cdk/core';\nimport * as path from 'path';\nimport * as cfn_inc from '@aws-cdk/cloudformation-include';\nimport * as s3 from '@aws-cdk/aws-s3';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as ec2 from '@aws-cdk/aws-ec2';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\nconst cfnKey = cfnTemplate.getResource('Key') as kms.CfnKey;\nconst key = kms.Key.fromCfnKey(cfnKey);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1076 "syntaxKindCounter": {
1077 "10": 1,
1078 "75": 13,
1079 "130": 1,
1080 "153": 2,
1081 "169": 2,
1082 "194": 3,
1083 "196": 2,
1084 "217": 1,
1085 "225": 3,
1086 "242": 3,
1087 "243": 3,
1088 "290": 1
1089 },
1090 "fqnsFingerprint": "fd54a4327b856b6ed0852460eb6359882ce10b8ef071048c54b7ae9d15b87e49"
1091 },
1092 "21b088e0c979214f46f30b775608becf17d34e63c6f76184aa069f8a486a6734": {
1093 "translations": {
1094 "python": {
1095 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_kms as kms\n\n# key_policy: Any\n\ncfn_key_props = kms.CfnKeyProps(\n key_policy=key_policy,\n\n # the properties below are optional\n description=\"description\",\n enabled=False,\n enable_key_rotation=False,\n key_spec=\"keySpec\",\n key_usage=\"keyUsage\",\n multi_region=False,\n pending_window_in_days=123,\n tags=[CfnTag(\n key=\"key\",\n value=\"value\"\n )]\n)",
1096 "version": "2"
1097 },
1098 "csharp": {
1099 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.KMS;\n\nvar keyPolicy;\n\nCfnKeyProps cfnKeyProps = new CfnKeyProps {\n KeyPolicy = keyPolicy,\n\n // the properties below are optional\n Description = \"description\",\n Enabled = false,\n EnableKeyRotation = false,\n KeySpec = \"keySpec\",\n KeyUsage = \"keyUsage\",\n MultiRegion = false,\n PendingWindowInDays = 123,\n Tags = new [] { new CfnTag {\n Key = \"key\",\n Value = \"value\"\n } }\n};",
1100 "version": "1"
1101 },
1102 "java": {
1103 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.kms.*;\n\nObject keyPolicy;\n\nCfnKeyProps cfnKeyProps = CfnKeyProps.builder()\n .keyPolicy(keyPolicy)\n\n // the properties below are optional\n .description(\"description\")\n .enabled(false)\n .enableKeyRotation(false)\n .keySpec(\"keySpec\")\n .keyUsage(\"keyUsage\")\n .multiRegion(false)\n .pendingWindowInDays(123)\n .tags(List.of(CfnTag.builder()\n .key(\"key\")\n .value(\"value\")\n .build()))\n .build();",
1104 "version": "1"
1105 },
1106 "go": {
1107 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\nvar keyPolicy interface{}\n\ncfnKeyProps := &cfnKeyProps{\n\tkeyPolicy: keyPolicy,\n\n\t// the properties below are optional\n\tdescription: jsii.String(\"description\"),\n\tenabled: jsii.Boolean(false),\n\tenableKeyRotation: jsii.Boolean(false),\n\tkeySpec: jsii.String(\"keySpec\"),\n\tkeyUsage: jsii.String(\"keyUsage\"),\n\tmultiRegion: jsii.Boolean(false),\n\tpendingWindowInDays: jsii.Number(123),\n\ttags: []cfnTag{\n\t\t&cfnTag{\n\t\t\tkey: jsii.String(\"key\"),\n\t\t\tvalue: jsii.String(\"value\"),\n\t\t},\n\t},\n}",
1108 "version": "1"
1109 },
1110 "$": {
1111 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const keyPolicy: any;\nconst cfnKeyProps: kms.CfnKeyProps = {\n keyPolicy: keyPolicy,\n\n // the properties below are optional\n description: 'description',\n enabled: false,\n enableKeyRotation: false,\n keySpec: 'keySpec',\n keyUsage: 'keyUsage',\n multiRegion: false,\n pendingWindowInDays: 123,\n tags: [{\n key: 'key',\n value: 'value',\n }],\n};",
1112 "version": "0"
1113 }
1114 },
1115 "location": {
1116 "api": {
1117 "api": "type",
1118 "fqn": "@aws-cdk/aws-kms.CfnKeyProps"
1119 },
1120 "field": {
1121 "field": "example"
1122 }
1123 },
1124 "didCompile": true,
1125 "fqnsReferenced": [
1126 "@aws-cdk/aws-kms.CfnKeyProps"
1127 ],
1128 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const keyPolicy: any;\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst cfnKeyProps: kms.CfnKeyProps = {\n keyPolicy: keyPolicy,\n\n // the properties below are optional\n description: 'description',\n enabled: false,\n enableKeyRotation: false,\n keySpec: 'keySpec',\n keyUsage: 'keyUsage',\n multiRegion: false,\n pendingWindowInDays: 123,\n tags: [{\n key: 'key',\n value: 'value',\n }],\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1129 "syntaxKindCounter": {
1130 "8": 1,
1131 "10": 6,
1132 "75": 17,
1133 "91": 3,
1134 "125": 1,
1135 "130": 1,
1136 "153": 1,
1137 "169": 1,
1138 "192": 1,
1139 "193": 2,
1140 "225": 2,
1141 "242": 2,
1142 "243": 2,
1143 "254": 1,
1144 "255": 1,
1145 "256": 1,
1146 "281": 11,
1147 "290": 1
1148 },
1149 "fqnsFingerprint": "a2f392cb842682f388ea00201d0547bfec4482d7cde09b35aed279d4bb743a37"
1150 },
1151 "dfa581d2885a579059fa407d8b0451610cf923ec1ccbe0772ea929842cfc7a11": {
1152 "translations": {
1153 "python": {
1154 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_kms as kms\n\n# key_policy: Any\n\ncfn_replica_key = kms.CfnReplicaKey(self, \"MyCfnReplicaKey\",\n key_policy=key_policy,\n primary_key_arn=\"primaryKeyArn\",\n\n # the properties below are optional\n description=\"description\",\n enabled=False,\n pending_window_in_days=123,\n tags=[CfnTag(\n key=\"key\",\n value=\"value\"\n )]\n)",
1155 "version": "2"
1156 },
1157 "csharp": {
1158 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.KMS;\n\nvar keyPolicy;\n\nCfnReplicaKey cfnReplicaKey = new CfnReplicaKey(this, \"MyCfnReplicaKey\", new CfnReplicaKeyProps {\n KeyPolicy = keyPolicy,\n PrimaryKeyArn = \"primaryKeyArn\",\n\n // the properties below are optional\n Description = \"description\",\n Enabled = false,\n PendingWindowInDays = 123,\n Tags = new [] { new CfnTag {\n Key = \"key\",\n Value = \"value\"\n } }\n});",
1159 "version": "1"
1160 },
1161 "java": {
1162 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.kms.*;\n\nObject keyPolicy;\n\nCfnReplicaKey cfnReplicaKey = CfnReplicaKey.Builder.create(this, \"MyCfnReplicaKey\")\n .keyPolicy(keyPolicy)\n .primaryKeyArn(\"primaryKeyArn\")\n\n // the properties below are optional\n .description(\"description\")\n .enabled(false)\n .pendingWindowInDays(123)\n .tags(List.of(CfnTag.builder()\n .key(\"key\")\n .value(\"value\")\n .build()))\n .build();",
1163 "version": "1"
1164 },
1165 "go": {
1166 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\nvar keyPolicy interface{}\n\ncfnReplicaKey := kms.NewCfnReplicaKey(this, jsii.String(\"MyCfnReplicaKey\"), &cfnReplicaKeyProps{\n\tkeyPolicy: keyPolicy,\n\tprimaryKeyArn: jsii.String(\"primaryKeyArn\"),\n\n\t// the properties below are optional\n\tdescription: jsii.String(\"description\"),\n\tenabled: jsii.Boolean(false),\n\tpendingWindowInDays: jsii.Number(123),\n\ttags: []cfnTag{\n\t\t&cfnTag{\n\t\t\tkey: jsii.String(\"key\"),\n\t\t\tvalue: jsii.String(\"value\"),\n\t\t},\n\t},\n})",
1167 "version": "1"
1168 },
1169 "$": {
1170 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const keyPolicy: any;\nconst cfnReplicaKey = new kms.CfnReplicaKey(this, 'MyCfnReplicaKey', {\n keyPolicy: keyPolicy,\n primaryKeyArn: 'primaryKeyArn',\n\n // the properties below are optional\n description: 'description',\n enabled: false,\n pendingWindowInDays: 123,\n tags: [{\n key: 'key',\n value: 'value',\n }],\n});",
1171 "version": "0"
1172 }
1173 },
1174 "location": {
1175 "api": {
1176 "api": "type",
1177 "fqn": "@aws-cdk/aws-kms.CfnReplicaKey"
1178 },
1179 "field": {
1180 "field": "example"
1181 }
1182 },
1183 "didCompile": true,
1184 "fqnsReferenced": [
1185 "@aws-cdk/aws-kms.CfnReplicaKey",
1186 "@aws-cdk/aws-kms.CfnReplicaKeyProps",
1187 "@aws-cdk/core.Construct"
1188 ],
1189 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const keyPolicy: any;\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst cfnReplicaKey = new kms.CfnReplicaKey(this, 'MyCfnReplicaKey', {\n keyPolicy: keyPolicy,\n primaryKeyArn: 'primaryKeyArn',\n\n // the properties below are optional\n description: 'description',\n enabled: false,\n pendingWindowInDays: 123,\n tags: [{\n key: 'key',\n value: 'value',\n }],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1190 "syntaxKindCounter": {
1191 "8": 1,
1192 "10": 6,
1193 "75": 14,
1194 "91": 1,
1195 "104": 1,
1196 "125": 1,
1197 "130": 1,
1198 "192": 1,
1199 "193": 2,
1200 "194": 1,
1201 "197": 1,
1202 "225": 2,
1203 "242": 2,
1204 "243": 2,
1205 "254": 1,
1206 "255": 1,
1207 "256": 1,
1208 "281": 8,
1209 "290": 1
1210 },
1211 "fqnsFingerprint": "6b391987ddbe204da32a46d2ea70b24293424d929aab2959f81a11636d016fb0"
1212 },
1213 "4a266d347ed52cdf049f777a6f2f845f5b606b0ddc59c5d2bf9c520ea2da6a2d": {
1214 "translations": {
1215 "python": {
1216 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_kms as kms\n\n# key_policy: Any\n\ncfn_replica_key_props = kms.CfnReplicaKeyProps(\n key_policy=key_policy,\n primary_key_arn=\"primaryKeyArn\",\n\n # the properties below are optional\n description=\"description\",\n enabled=False,\n pending_window_in_days=123,\n tags=[CfnTag(\n key=\"key\",\n value=\"value\"\n )]\n)",
1217 "version": "2"
1218 },
1219 "csharp": {
1220 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.KMS;\n\nvar keyPolicy;\n\nCfnReplicaKeyProps cfnReplicaKeyProps = new CfnReplicaKeyProps {\n KeyPolicy = keyPolicy,\n PrimaryKeyArn = \"primaryKeyArn\",\n\n // the properties below are optional\n Description = \"description\",\n Enabled = false,\n PendingWindowInDays = 123,\n Tags = new [] { new CfnTag {\n Key = \"key\",\n Value = \"value\"\n } }\n};",
1221 "version": "1"
1222 },
1223 "java": {
1224 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.kms.*;\n\nObject keyPolicy;\n\nCfnReplicaKeyProps cfnReplicaKeyProps = CfnReplicaKeyProps.builder()\n .keyPolicy(keyPolicy)\n .primaryKeyArn(\"primaryKeyArn\")\n\n // the properties below are optional\n .description(\"description\")\n .enabled(false)\n .pendingWindowInDays(123)\n .tags(List.of(CfnTag.builder()\n .key(\"key\")\n .value(\"value\")\n .build()))\n .build();",
1225 "version": "1"
1226 },
1227 "go": {
1228 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\nvar keyPolicy interface{}\n\ncfnReplicaKeyProps := &cfnReplicaKeyProps{\n\tkeyPolicy: keyPolicy,\n\tprimaryKeyArn: jsii.String(\"primaryKeyArn\"),\n\n\t// the properties below are optional\n\tdescription: jsii.String(\"description\"),\n\tenabled: jsii.Boolean(false),\n\tpendingWindowInDays: jsii.Number(123),\n\ttags: []cfnTag{\n\t\t&cfnTag{\n\t\t\tkey: jsii.String(\"key\"),\n\t\t\tvalue: jsii.String(\"value\"),\n\t\t},\n\t},\n}",
1229 "version": "1"
1230 },
1231 "$": {
1232 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const keyPolicy: any;\nconst cfnReplicaKeyProps: kms.CfnReplicaKeyProps = {\n keyPolicy: keyPolicy,\n primaryKeyArn: 'primaryKeyArn',\n\n // the properties below are optional\n description: 'description',\n enabled: false,\n pendingWindowInDays: 123,\n tags: [{\n key: 'key',\n value: 'value',\n }],\n};",
1233 "version": "0"
1234 }
1235 },
1236 "location": {
1237 "api": {
1238 "api": "type",
1239 "fqn": "@aws-cdk/aws-kms.CfnReplicaKeyProps"
1240 },
1241 "field": {
1242 "field": "example"
1243 }
1244 },
1245 "didCompile": true,
1246 "fqnsReferenced": [
1247 "@aws-cdk/aws-kms.CfnReplicaKeyProps"
1248 ],
1249 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const keyPolicy: any;\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst cfnReplicaKeyProps: kms.CfnReplicaKeyProps = {\n keyPolicy: keyPolicy,\n primaryKeyArn: 'primaryKeyArn',\n\n // the properties below are optional\n description: 'description',\n enabled: false,\n pendingWindowInDays: 123,\n tags: [{\n key: 'key',\n value: 'value',\n }],\n};\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1250 "syntaxKindCounter": {
1251 "8": 1,
1252 "10": 5,
1253 "75": 14,
1254 "91": 1,
1255 "125": 1,
1256 "130": 1,
1257 "153": 1,
1258 "169": 1,
1259 "192": 1,
1260 "193": 2,
1261 "225": 2,
1262 "242": 2,
1263 "243": 2,
1264 "254": 1,
1265 "255": 1,
1266 "256": 1,
1267 "281": 8,
1268 "290": 1
1269 },
1270 "fqnsFingerprint": "a967fd184bce7c5284315676bec6412bf0834533a2121e2e31c93b0dd1476c9c"
1271 },
1272 "20feb012d096f0c765da1ae2e2f883e2285fb042bc59a498f4078470c4a1d911": {
1273 "translations": {
1274 "python": {
1275 "source": "import aws_cdk.aws_kms as kms\n\n\nencryption_key = kms.Key(self, \"Key\",\n enable_key_rotation=True\n)\ntable = dynamodb.Table(self, \"MyTable\",\n partition_key=dynamodb.Attribute(name=\"id\", type=dynamodb.AttributeType.STRING),\n encryption=dynamodb.TableEncryption.CUSTOMER_MANAGED,\n encryption_key=encryption_key\n)",
1276 "version": "2"
1277 },
1278 "csharp": {
1279 "source": "using Amazon.CDK.AWS.KMS;\n\n\nKey encryptionKey = new Key(this, \"Key\", new KeyProps {\n EnableKeyRotation = true\n});\nTable table = new Table(this, \"MyTable\", new TableProps {\n PartitionKey = new Attribute { Name = \"id\", Type = AttributeType.STRING },\n Encryption = TableEncryption.CUSTOMER_MANAGED,\n EncryptionKey = encryptionKey\n});",
1280 "version": "1"
1281 },
1282 "java": {
1283 "source": "import software.amazon.awscdk.services.kms.*;\n\n\nKey encryptionKey = Key.Builder.create(this, \"Key\")\n .enableKeyRotation(true)\n .build();\nTable table = Table.Builder.create(this, \"MyTable\")\n .partitionKey(Attribute.builder().name(\"id\").type(AttributeType.STRING).build())\n .encryption(TableEncryption.CUSTOMER_MANAGED)\n .encryptionKey(encryptionKey)\n .build();",
1284 "version": "1"
1285 },
1286 "go": {
1287 "source": "import kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\n\nencryptionKey := kms.NewKey(this, jsii.String(\"Key\"), &keyProps{\n\tenableKeyRotation: jsii.Boolean(true),\n})\ntable := dynamodb.NewTable(this, jsii.String(\"MyTable\"), &tableProps{\n\tpartitionKey: &attribute{\n\t\tname: jsii.String(\"id\"),\n\t\ttype: dynamodb.attributeType_STRING,\n\t},\n\tencryption: dynamodb.tableEncryption_CUSTOMER_MANAGED,\n\tencryptionKey: encryptionKey,\n})",
1288 "version": "1"
1289 },
1290 "$": {
1291 "source": "import * as kms from '@aws-cdk/aws-kms';\n\nconst encryptionKey = new kms.Key(this, 'Key', {\n enableKeyRotation: true,\n});\nconst table = new dynamodb.Table(this, 'MyTable', {\n partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING },\n encryption: dynamodb.TableEncryption.CUSTOMER_MANAGED,\n encryptionKey, // This will be exposed as table.encryptionKey\n});",
1292 "version": "0"
1293 }
1294 },
1295 "location": {
1296 "api": {
1297 "api": "type",
1298 "fqn": "@aws-cdk/aws-kms.Key"
1299 },
1300 "field": {
1301 "field": "example"
1302 }
1303 },
1304 "didCompile": true,
1305 "fqnsReferenced": [
1306 "@aws-cdk/aws-dynamodb.Attribute",
1307 "@aws-cdk/aws-dynamodb.AttributeType",
1308 "@aws-cdk/aws-dynamodb.AttributeType#STRING",
1309 "@aws-cdk/aws-dynamodb.Table",
1310 "@aws-cdk/aws-dynamodb.TableEncryption",
1311 "@aws-cdk/aws-dynamodb.TableEncryption#CUSTOMER_MANAGED",
1312 "@aws-cdk/aws-dynamodb.TableProps",
1313 "@aws-cdk/aws-kms.IKey",
1314 "@aws-cdk/aws-kms.Key",
1315 "@aws-cdk/aws-kms.KeyProps",
1316 "constructs.Construct"
1317 ],
1318 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as kms from '@aws-cdk/aws-kms';\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport dynamodb = require('@aws-cdk/aws-dynamodb');\nimport iam = require('@aws-cdk/aws-iam');\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\n\n\nconst encryptionKey = new kms.Key(this, 'Key', {\n enableKeyRotation: true,\n});\nconst table = new dynamodb.Table(this, 'MyTable', {\n partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING },\n encryption: dynamodb.TableEncryption.CUSTOMER_MANAGED,\n encryptionKey, // This will be exposed as table.encryptionKey\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n",
1319 "syntaxKindCounter": {
1320 "10": 4,
1321 "75": 19,
1322 "104": 2,
1323 "106": 1,
1324 "193": 3,
1325 "194": 6,
1326 "197": 2,
1327 "225": 2,
1328 "242": 2,
1329 "243": 2,
1330 "254": 1,
1331 "255": 1,
1332 "256": 1,
1333 "281": 5,
1334 "282": 1,
1335 "290": 1
1336 },
1337 "fqnsFingerprint": "76fea3cde1ec69480038a0bc76681f69a6f0c55ff8b27b50b28089f356c5c6cc"
1338 },
1339 "785368ddb63b0a56d0df9c65ed503a04eadcf8bbdf58c9abcec5500b6f996484": {
1340 "translations": {
1341 "python": {
1342 "source": "my_key_lookup = kms.Key.from_lookup(self, \"MyKeyLookup\",\n alias_name=\"alias/KeyAlias\"\n)\n\nrole = iam.Role(self, \"MyRole\",\n assumed_by=iam.ServicePrincipal(\"lambda.amazonaws.com\")\n)\nmy_key_lookup.grant_encrypt_decrypt(role)",
1343 "version": "2"
1344 },
1345 "csharp": {
1346 "source": "IKey myKeyLookup = Key.FromLookup(this, \"MyKeyLookup\", new KeyLookupOptions {\n AliasName = \"alias/KeyAlias\"\n});\n\nRole role = new Role(this, \"MyRole\", new RoleProps {\n AssumedBy = new ServicePrincipal(\"lambda.amazonaws.com\")\n});\nmyKeyLookup.GrantEncryptDecrypt(role);",
1347 "version": "1"
1348 },
1349 "java": {
1350 "source": "IKey myKeyLookup = Key.fromLookup(this, \"MyKeyLookup\", KeyLookupOptions.builder()\n .aliasName(\"alias/KeyAlias\")\n .build());\n\nRole role = Role.Builder.create(this, \"MyRole\")\n .assumedBy(new ServicePrincipal(\"lambda.amazonaws.com\"))\n .build();\nmyKeyLookup.grantEncryptDecrypt(role);",
1351 "version": "1"
1352 },
1353 "go": {
1354 "source": "myKeyLookup := kms.key.fromLookup(this, jsii.String(\"MyKeyLookup\"), &keyLookupOptions{\n\taliasName: jsii.String(\"alias/KeyAlias\"),\n})\n\nrole := iam.NewRole(this, jsii.String(\"MyRole\"), &roleProps{\n\tassumedBy: iam.NewServicePrincipal(jsii.String(\"lambda.amazonaws.com\")),\n})\nmyKeyLookup.grantEncryptDecrypt(role)",
1355 "version": "1"
1356 },
1357 "$": {
1358 "source": "const myKeyLookup = kms.Key.fromLookup(this, 'MyKeyLookup', {\n aliasName: 'alias/KeyAlias',\n});\n\nconst role = new iam.Role(this, 'MyRole', {\n assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),\n});\nmyKeyLookup.grantEncryptDecrypt(role);",
1359 "version": "0"
1360 }
1361 },
1362 "location": {
1363 "api": {
1364 "api": "type",
1365 "fqn": "@aws-cdk/aws-kms.KeyLookupOptions"
1366 },
1367 "field": {
1368 "field": "example"
1369 }
1370 },
1371 "didCompile": true,
1372 "fqnsReferenced": [
1373 "@aws-cdk/aws-iam.IGrantable",
1374 "@aws-cdk/aws-iam.IPrincipal",
1375 "@aws-cdk/aws-iam.Role",
1376 "@aws-cdk/aws-iam.RoleProps",
1377 "@aws-cdk/aws-iam.ServicePrincipal",
1378 "@aws-cdk/aws-kms.IKey",
1379 "@aws-cdk/aws-kms.IKey#grantEncryptDecrypt",
1380 "@aws-cdk/aws-kms.Key",
1381 "@aws-cdk/aws-kms.Key#fromLookup",
1382 "@aws-cdk/aws-kms.KeyLookupOptions",
1383 "constructs.Construct"
1384 ],
1385 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst myKeyLookup = kms.Key.fromLookup(this, 'MyKeyLookup', {\n aliasName: 'alias/KeyAlias',\n});\n\nconst role = new iam.Role(this, 'MyRole', {\n assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),\n});\nmyKeyLookup.grantEncryptDecrypt(role);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
1386 "syntaxKindCounter": {
1387 "10": 4,
1388 "75": 14,
1389 "104": 2,
1390 "193": 2,
1391 "194": 5,
1392 "196": 2,
1393 "197": 2,
1394 "225": 2,
1395 "226": 1,
1396 "242": 2,
1397 "243": 2,
1398 "281": 2
1399 },
1400 "fqnsFingerprint": "26b3bcee08c2320d35d3665e0008627296a2fcd4b2d7aaf4e601367fbcf34bbd"
1401 },
1402 "bc45307f07c49c35aff48981aa4bbe7d62198aab96caea7d47d076161f7273d6": {
1403 "translations": {
1404 "python": {
1405 "source": "my_trusted_admin_role = iam.Role.from_role_arn(self, \"TrustedRole\", \"arn:aws:iam:....\")\n# Creates a limited admin policy and assigns to the account root.\nmy_custom_policy = iam.PolicyDocument(\n statements=[iam.PolicyStatement(\n actions=[\"kms:Create*\", \"kms:Describe*\", \"kms:Enable*\", \"kms:List*\", \"kms:Put*\"\n ],\n principals=[iam.AccountRootPrincipal()],\n resources=[\"*\"]\n )]\n)\nkey = kms.Key(self, \"MyKey\",\n policy=my_custom_policy\n)",
1406 "version": "2"
1407 },
1408 "csharp": {
1409 "source": "IRole myTrustedAdminRole = Role.FromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\n// Creates a limited admin policy and assigns to the account root.\nPolicyDocument myCustomPolicy = new PolicyDocument(new PolicyDocumentProps {\n Statements = new [] { new PolicyStatement(new PolicyStatementProps {\n Actions = new [] { \"kms:Create*\", \"kms:Describe*\", \"kms:Enable*\", \"kms:List*\", \"kms:Put*\" },\n Principals = new [] { new AccountRootPrincipal() },\n Resources = new [] { \"*\" }\n }) }\n});\nKey key = new Key(this, \"MyKey\", new KeyProps {\n Policy = myCustomPolicy\n});",
1410 "version": "1"
1411 },
1412 "java": {
1413 "source": "IRole myTrustedAdminRole = Role.fromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\n// Creates a limited admin policy and assigns to the account root.\nPolicyDocument myCustomPolicy = PolicyDocument.Builder.create()\n .statements(List.of(PolicyStatement.Builder.create()\n .actions(List.of(\"kms:Create*\", \"kms:Describe*\", \"kms:Enable*\", \"kms:List*\", \"kms:Put*\"))\n .principals(List.of(new AccountRootPrincipal()))\n .resources(List.of(\"*\"))\n .build()))\n .build();\nKey key = Key.Builder.create(this, \"MyKey\")\n .policy(myCustomPolicy)\n .build();",
1414 "version": "1"
1415 },
1416 "go": {
1417 "source": "myTrustedAdminRole := iam.role.fromRoleArn(this, jsii.String(\"TrustedRole\"), jsii.String(\"arn:aws:iam:....\"))\n// Creates a limited admin policy and assigns to the account root.\nmyCustomPolicy := iam.NewPolicyDocument(&policyDocumentProps{\n\tstatements: []policyStatement{\n\t\tiam.NewPolicyStatement(&policyStatementProps{\n\t\t\tactions: []*string{\n\t\t\t\tjsii.String(\"kms:Create*\"),\n\t\t\t\tjsii.String(\"kms:Describe*\"),\n\t\t\t\tjsii.String(\"kms:Enable*\"),\n\t\t\t\tjsii.String(\"kms:List*\"),\n\t\t\t\tjsii.String(\"kms:Put*\"),\n\t\t\t},\n\t\t\tprincipals: []iPrincipal{\n\t\t\t\tiam.NewAccountRootPrincipal(),\n\t\t\t},\n\t\t\tresources: []*string{\n\t\t\t\tjsii.String(\"*\"),\n\t\t\t},\n\t\t}),\n\t},\n})\nkey := kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\tpolicy: myCustomPolicy,\n})",
1418 "version": "1"
1419 },
1420 "$": {
1421 "source": "const myTrustedAdminRole = iam.Role.fromRoleArn(this, 'TrustedRole', 'arn:aws:iam:....');\n// Creates a limited admin policy and assigns to the account root.\nconst myCustomPolicy = new iam.PolicyDocument({\n statements: [new iam.PolicyStatement({\n actions: [\n 'kms:Create*',\n 'kms:Describe*',\n 'kms:Enable*',\n 'kms:List*',\n 'kms:Put*',\n ],\n principals: [new iam.AccountRootPrincipal()],\n resources: ['*'],\n })],\n});\nconst key = new kms.Key(this, 'MyKey', {\n policy: myCustomPolicy,\n});",
1422 "version": "0"
1423 }
1424 },
1425 "location": {
1426 "api": {
1427 "api": "type",
1428 "fqn": "@aws-cdk/aws-kms.KeyProps"
1429 },
1430 "field": {
1431 "field": "example"
1432 }
1433 },
1434 "didCompile": true,
1435 "fqnsReferenced": [
1436 "@aws-cdk/aws-iam.AccountRootPrincipal",
1437 "@aws-cdk/aws-iam.IRole",
1438 "@aws-cdk/aws-iam.PolicyDocument",
1439 "@aws-cdk/aws-iam.PolicyDocumentProps",
1440 "@aws-cdk/aws-iam.PolicyStatement",
1441 "@aws-cdk/aws-iam.PolicyStatementProps",
1442 "@aws-cdk/aws-iam.Role",
1443 "@aws-cdk/aws-iam.Role#fromRoleArn",
1444 "@aws-cdk/aws-kms.Key",
1445 "@aws-cdk/aws-kms.KeyProps",
1446 "constructs.Construct"
1447 ],
1448 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst myTrustedAdminRole = iam.Role.fromRoleArn(this, 'TrustedRole', 'arn:aws:iam:....');\n// Creates a limited admin policy and assigns to the account root.\nconst myCustomPolicy = new iam.PolicyDocument({\n statements: [new iam.PolicyStatement({\n actions: [\n 'kms:Create*',\n 'kms:Describe*',\n 'kms:Enable*',\n 'kms:List*',\n 'kms:Put*',\n ],\n principals: [new iam.AccountRootPrincipal()],\n resources: ['*'],\n })],\n});\nconst key = new kms.Key(this, 'MyKey', {\n policy: myCustomPolicy,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
1449 "syntaxKindCounter": {
1450 "10": 9,
1451 "75": 20,
1452 "104": 2,
1453 "192": 4,
1454 "193": 3,
1455 "194": 6,
1456 "196": 1,
1457 "197": 4,
1458 "225": 3,
1459 "242": 3,
1460 "243": 3,
1461 "281": 5
1462 },
1463 "fqnsFingerprint": "934404f881a4076b95e1653ee0ba8630dc2e38b336a690d4f27debcc1059e395"
1464 },
1465 "ed806c245b66c1f79593de4a19334f708d2f52aac88bdb299cdc502c3d7e4b60": {
1466 "translations": {
1467 "python": {
1468 "source": "key = kms.Key(self, \"MyKey\",\n key_spec=kms.KeySpec.ECC_SECG_P256K1, # Default to SYMMETRIC_DEFAULT\n key_usage=kms.KeyUsage.SIGN_VERIFY\n)",
1469 "version": "2"
1470 },
1471 "csharp": {
1472 "source": "Key key = new Key(this, \"MyKey\", new KeyProps {\n KeySpec = KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n KeyUsage = KeyUsage.SIGN_VERIFY\n});",
1473 "version": "1"
1474 },
1475 "java": {
1476 "source": "Key key = Key.Builder.create(this, \"MyKey\")\n .keySpec(KeySpec.ECC_SECG_P256K1) // Default to SYMMETRIC_DEFAULT\n .keyUsage(KeyUsage.SIGN_VERIFY)\n .build();",
1477 "version": "1"
1478 },
1479 "go": {
1480 "source": "key := kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\tkeySpec: kms.keySpec_ECC_SECG_P256K1,\n\t // Default to SYMMETRIC_DEFAULT\n\tkeyUsage: kms.keyUsage_SIGN_VERIFY,\n})",
1481 "version": "1"
1482 },
1483 "$": {
1484 "source": "const key = new kms.Key(this, 'MyKey', {\n keySpec: kms.KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n keyUsage: kms.KeyUsage.SIGN_VERIFY, // and ENCRYPT_DECRYPT\n});",
1485 "version": "0"
1486 }
1487 },
1488 "location": {
1489 "api": {
1490 "api": "type",
1491 "fqn": "@aws-cdk/aws-kms.KeySpec"
1492 },
1493 "field": {
1494 "field": "example"
1495 }
1496 },
1497 "didCompile": true,
1498 "fqnsReferenced": [
1499 "@aws-cdk/aws-kms.Key",
1500 "@aws-cdk/aws-kms.KeyProps",
1501 "@aws-cdk/aws-kms.KeySpec",
1502 "@aws-cdk/aws-kms.KeySpec#ECC_SECG_P256K1",
1503 "@aws-cdk/aws-kms.KeyUsage",
1504 "@aws-cdk/aws-kms.KeyUsage#SIGN_VERIFY",
1505 "constructs.Construct"
1506 ],
1507 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst key = new kms.Key(this, 'MyKey', {\n keySpec: kms.KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n keyUsage: kms.KeyUsage.SIGN_VERIFY, // and ENCRYPT_DECRYPT\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
1508 "syntaxKindCounter": {
1509 "10": 1,
1510 "75": 11,
1511 "104": 1,
1512 "193": 1,
1513 "194": 5,
1514 "197": 1,
1515 "225": 1,
1516 "242": 1,
1517 "243": 1,
1518 "281": 2
1519 },
1520 "fqnsFingerprint": "af77273d35526f63dc7723e77516d3dc2a7dd280b2a4cbb1856a56e1d91ae1c7"
1521 },
1522 "1690e6e81eb7d872549450d8ccaafcb022cd560ed8413d837701d9d8de1638b2": {
1523 "translations": {
1524 "python": {
1525 "source": "key = kms.Key(self, \"MyKey\",\n key_spec=kms.KeySpec.ECC_SECG_P256K1, # Default to SYMMETRIC_DEFAULT\n key_usage=kms.KeyUsage.SIGN_VERIFY\n)",
1526 "version": "2"
1527 },
1528 "csharp": {
1529 "source": "Key key = new Key(this, \"MyKey\", new KeyProps {\n KeySpec = KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n KeyUsage = KeyUsage.SIGN_VERIFY\n});",
1530 "version": "1"
1531 },
1532 "java": {
1533 "source": "Key key = Key.Builder.create(this, \"MyKey\")\n .keySpec(KeySpec.ECC_SECG_P256K1) // Default to SYMMETRIC_DEFAULT\n .keyUsage(KeyUsage.SIGN_VERIFY)\n .build();",
1534 "version": "1"
1535 },
1536 "go": {
1537 "source": "key := kms.NewKey(this, jsii.String(\"MyKey\"), &keyProps{\n\tkeySpec: kms.keySpec_ECC_SECG_P256K1,\n\t // Default to SYMMETRIC_DEFAULT\n\tkeyUsage: kms.keyUsage_SIGN_VERIFY,\n})",
1538 "version": "1"
1539 },
1540 "$": {
1541 "source": "const key = new kms.Key(this, 'MyKey', {\n keySpec: kms.KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n keyUsage: kms.KeyUsage.SIGN_VERIFY, // and ENCRYPT_DECRYPT\n});",
1542 "version": "0"
1543 }
1544 },
1545 "location": {
1546 "api": {
1547 "api": "type",
1548 "fqn": "@aws-cdk/aws-kms.KeyUsage"
1549 },
1550 "field": {
1551 "field": "example"
1552 }
1553 },
1554 "didCompile": true,
1555 "fqnsReferenced": [
1556 "@aws-cdk/aws-kms.Key",
1557 "@aws-cdk/aws-kms.KeyProps",
1558 "@aws-cdk/aws-kms.KeySpec",
1559 "@aws-cdk/aws-kms.KeySpec#ECC_SECG_P256K1",
1560 "@aws-cdk/aws-kms.KeyUsage",
1561 "@aws-cdk/aws-kms.KeyUsage#SIGN_VERIFY",
1562 "constructs.Construct"
1563 ],
1564 "fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Duration, Stack } from '@aws-cdk/core';\nimport * as kms from '@aws-cdk/aws-kms';\nimport * as iam from '@aws-cdk/aws-iam';\n\nclass Fixture extends Stack {\n constructor(scope: Construct, id: string) {\n super(scope, id);\n\n // Code snippet begins after !show marker below\n/// !show\nconst key = new kms.Key(this, 'MyKey', {\n keySpec: kms.KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n keyUsage: kms.KeyUsage.SIGN_VERIFY, // and ENCRYPT_DECRYPT\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
1565 "syntaxKindCounter": {
1566 "10": 1,
1567 "75": 11,
1568 "104": 1,
1569 "193": 1,
1570 "194": 5,
1571 "197": 1,
1572 "225": 1,
1573 "242": 1,
1574 "243": 1,
1575 "281": 2
1576 },
1577 "fqnsFingerprint": "af77273d35526f63dc7723e77516d3dc2a7dd280b2a4cbb1856a56e1d91ae1c7"
1578 },
1579 "873716e3f9773fcc360601181158685f0ee754c2cf608e5000a8419820c491c2": {
1580 "translations": {
1581 "python": {
1582 "source": "# The code below shows an example of how to instantiate this type.\n# The values are placeholders you should change.\nimport aws_cdk.aws_iam as iam\nimport aws_cdk.aws_kms as kms\n\n# principal: iam.IPrincipal\n\nvia_service_principal = kms.ViaServicePrincipal(\"serviceName\", principal)",
1583 "version": "2"
1584 },
1585 "csharp": {
1586 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nusing Amazon.CDK.AWS.IAM;\nusing Amazon.CDK.AWS.KMS;\n\nIPrincipal principal;\n\nViaServicePrincipal viaServicePrincipal = new ViaServicePrincipal(\"serviceName\", principal);",
1587 "version": "1"
1588 },
1589 "java": {
1590 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport software.amazon.awscdk.services.iam.*;\nimport software.amazon.awscdk.services.kms.*;\n\nIPrincipal principal;\n\nViaServicePrincipal viaServicePrincipal = new ViaServicePrincipal(\"serviceName\", principal);",
1591 "version": "1"
1592 },
1593 "go": {
1594 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport iam \"github.com/aws-samples/dummy/awscdkawsiam\"\nimport kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\nvar principal iPrincipal\n\nviaServicePrincipal := kms.NewViaServicePrincipal(jsii.String(\"serviceName\"), principal)",
1595 "version": "1"
1596 },
1597 "$": {
1598 "source": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const principal: iam.IPrincipal;\nconst viaServicePrincipal = new kms.ViaServicePrincipal('serviceName', /* all optional props */ principal);",
1599 "version": "0"
1600 }
1601 },
1602 "location": {
1603 "api": {
1604 "api": "type",
1605 "fqn": "@aws-cdk/aws-kms.ViaServicePrincipal"
1606 },
1607 "field": {
1608 "field": "example"
1609 }
1610 },
1611 "didCompile": true,
1612 "fqnsReferenced": [
1613 "@aws-cdk/aws-iam.IPrincipal",
1614 "@aws-cdk/aws-kms.ViaServicePrincipal"
1615 ],
1616 "fullSource": "// Hoisted imports begin after !show marker below\n/// !show\n// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as kms from '@aws-cdk/aws-kms';\n\ndeclare const principal: iam.IPrincipal;\n/// !hide\n// Hoisted imports ended before !hide marker above\nimport { Construct } from \"@aws-cdk/core\";\nclass MyConstruct extends Construct {\nconstructor(scope: Construct, id: string) {\nsuper(scope, id);\n// Code snippet begins after !show marker below\n/// !show\n\nconst viaServicePrincipal = new kms.ViaServicePrincipal('serviceName', /* all optional props */ principal);\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
1617 "syntaxKindCounter": {
1618 "10": 3,
1619 "75": 9,
1620 "130": 1,
1621 "153": 1,
1622 "169": 1,
1623 "194": 1,
1624 "197": 1,
1625 "225": 2,
1626 "242": 2,
1627 "243": 2,
1628 "254": 2,
1629 "255": 2,
1630 "256": 2,
1631 "290": 1
1632 },
1633 "fqnsFingerprint": "c3d574ec5c683fb1c778029b3c1d1046b5ef7d384119988989a619b07669cd29"
1634 }
1635 }
1636}
\No newline at end of file