1 | {"version":"2","toolVersion":"1.84.0","snippets":{"0ad02fde94b94efd8e110217f997271482722082350c156da1225648d32ce940":{"translations":{"python":{"source":"kms.Key(self, \"MyKey\",\n enable_key_rotation=True\n)","version":"2"},"csharp":{"source":"new Key(this, \"MyKey\", new KeyProps {\n EnableKeyRotation = true\n});","version":"1"},"java":{"source":"Key.Builder.create(this, \"MyKey\")\n .enableKeyRotation(true)\n .build();","version":"1"},"go":{"source":"kms.NewKey(this, jsii.String(\"MyKey\"), &KeyProps{\n\tEnableKeyRotation: jsii.Boolean(true),\n})","version":"1"},"$":{"source":"new kms.Key(this, 'MyKey', {\n enableKeyRotation: true,\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":21}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","constructs.Construct"],"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","syntaxKindCounter":{"10":1,"75":3,"104":1,"106":1,"193":1,"194":1,"197":1,"226":1,"281":1},"fqnsFingerprint":"0916683fae71d7975297147cfff0b1a17e9636759086d074aba647a1c232945c"},"e311e0be03390f6d9c7731918629ad9cba3668ddc843bb1f3d01f8a782966700":{"translations":{"python":{"source":"key = kms.Key(self, \"MyKey\",\n pending_window=Duration.days(10)\n)","version":"2"},"csharp":{"source":"var key = new Key(this, \"MyKey\", new KeyProps {\n PendingWindow = Duration.Days(10)\n});","version":"1"},"java":{"source":"Key key = Key.Builder.create(this, \"MyKey\")\n .pendingWindow(Duration.days(10))\n .build();","version":"1"},"go":{"source":"key := kms.NewKey(this, jsii.String(\"MyKey\"), &KeyProps{\n\tPendingWindow: awscdkcore.Duration_Days(jsii.Number(10)),\n})","version":"1"},"$":{"source":"const key = new kms.Key(this, 'MyKey', {\n pendingWindow: Duration.days(10), // Default to 30 Days\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":31}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","@aws-cdk/core.Duration","@aws-cdk/core.Duration#days","constructs.Construct"],"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","syntaxKindCounter":{"8":1,"10":1,"75":6,"104":1,"193":1,"194":2,"196":1,"197":1,"225":1,"242":1,"243":1,"281":1},"fqnsFingerprint":"6cc626c43b793cde9f0bcd32806daa182ca7f4dc7a425478af2237eaef472445"},"aabe9e5dab5a8b01bf60c651c2acd958585bc7f3233f837babcf3c85a5556f32":{"translations":{"python":{"source":"key = kms.Key(self, \"MyKey\")\nkey.add_alias(\"alias/foo\")\nkey.add_alias(\"alias/bar\")","version":"2"},"csharp":{"source":"var key = new Key(this, \"MyKey\");\nkey.AddAlias(\"alias/foo\");\nkey.AddAlias(\"alias/bar\");","version":"1"},"java":{"source":"Key key = new Key(this, \"MyKey\");\nkey.addAlias(\"alias/foo\");\nkey.addAlias(\"alias/bar\");","version":"1"},"go":{"source":"key := kms.NewKey(this, jsii.String(\"MyKey\"))\nkey.addAlias(jsii.String(\"alias/foo\"))\nkey.addAlias(jsii.String(\"alias/bar\"))","version":"1"},"$":{"source":"const key = new kms.Key(this, 'MyKey');\nkey.addAlias('alias/foo');\nkey.addAlias('alias/bar');","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":40}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Key","constructs.Construct"],"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","syntaxKindCounter":{"10":3,"75":7,"104":1,"194":3,"196":2,"197":1,"225":1,"226":2,"242":1,"243":1},"fqnsFingerprint":"a62621ee079d3223aab5818f38b89b7d2c9028c6afab09be4874fe180e166099"},"05f7c34014b0352bb0aa31af76085551527fcc8037bbc1a5e1c2135fc51aa977":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var key = new Key(this, \"MyKey\", new KeyProps {\n KeySpec = KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n KeyUsage = KeyUsage.SIGN_VERIFY\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":51}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","@aws-cdk/aws-kms.KeySpec","@aws-cdk/aws-kms.KeySpec#ECC_SECG_P256K1","@aws-cdk/aws-kms.KeyUsage","@aws-cdk/aws-kms.KeyUsage#SIGN_VERIFY","constructs.Construct"],"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","syntaxKindCounter":{"10":1,"75":11,"104":1,"193":1,"194":5,"197":1,"225":1,"242":1,"243":1,"281":2},"fqnsFingerprint":"af77273d35526f63dc7723e77516d3dc2a7dd280b2a4cbb1856a56e1d91ae1c7"},"7273ddb7cb9e300bba421403e50a89bce99b234df22cc9e8edca632c941fa797":{"translations":{"python":{"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)","version":"2"},"csharp":{"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\nvar keyStack = new KeyStack(app, \"KeyStack\");\nnew UseStack(app, \"UseStack\", new UseStackProps { Key = keyStack.Key });","version":"1"},"java":{"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()));","version":"1"},"go":{"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})","version":"1"},"$":{"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 });","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":63}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Alias","@aws-cdk/aws-kms.AliasProps","@aws-cdk/aws-kms.IKey","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","@aws-cdk/core.App","@aws-cdk/core.RemovalPolicy","@aws-cdk/core.RemovalPolicy#DESTROY","@aws-cdk/core.Stack","@aws-cdk/core.StackProps","constructs.Construct"],"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","syntaxKindCounter":{"10":5,"57":1,"62":1,"75":55,"102":2,"104":3,"119":1,"138":1,"143":2,"153":5,"156":6,"158":1,"159":1,"162":2,"169":6,"193":3,"194":10,"196":2,"197":4,"209":1,"216":3,"223":2,"225":1,"226":5,"242":1,"243":1,"245":2,"246":1,"279":3,"281":4},"fqnsFingerprint":"dc71a585e1b7712ce79e1bf6ccb15a9dfec364ea15d88ab0a0ec48b01d3cbbdd"},"fe337821dfa1e9333a87720cb423add6e58c7173ecb3827f4066e25fb382aa55":{"translations":{"python":{"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\")","version":"2"},"csharp":{"source":"var myKeyImported = Key.FromKeyArn(this, \"MyImportedKey\", \"arn:aws:...\");\n\n// you can do stuff with this imported key.\nmyKeyImported.AddAlias(\"alias/foo\");","version":"1"},"java":{"source":"IKey myKeyImported = Key.fromKeyArn(this, \"MyImportedKey\", \"arn:aws:...\");\n\n// you can do stuff with this imported key.\nmyKeyImported.addAlias(\"alias/foo\");","version":"1"},"go":{"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\"))","version":"1"},"$":{"source":"const myKeyImported = kms.Key.fromKeyArn(this, 'MyImportedKey', 'arn:aws:...');\n\n// you can do stuff with this imported key.\nmyKeyImported.addAlias('alias/foo');","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":108}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.IKey","@aws-cdk/aws-kms.IKey#addAlias","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.Key#fromKeyArn","constructs.Construct"],"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","syntaxKindCounter":{"10":3,"75":6,"104":1,"194":3,"196":2,"225":1,"226":1,"242":1,"243":1},"fqnsFingerprint":"aebd1fd23fa118378a3c57d3770075cec9e81d11e07e79cbdcbeb5154530e7c0"},"6a6f49e170bfb854b16a39acb03ce73437abb7d1d54317a535c78dc35c951efa":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.CloudTrail;\n\n\nvar myKeyAlias = Alias.FromAliasName(this, \"myKey\", \"alias/aws/s3\");\nvar trail = new Trail(this, \"myCloudTrail\", new TrailProps {\n SendToCloudWatchLogs = true,\n KmsKey = myKeyAlias\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":124}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-cloudtrail.Trail","@aws-cdk/aws-cloudtrail.TrailProps","@aws-cdk/aws-kms.Alias","@aws-cdk/aws-kms.Alias#fromAliasName","@aws-cdk/aws-kms.IAlias","@aws-cdk/aws-kms.IKey","constructs.Construct"],"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","syntaxKindCounter":{"10":4,"75":11,"104":2,"106":1,"193":1,"194":3,"196":1,"197":1,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":2,"290":1},"fqnsFingerprint":"0c637c610d8ccb80e1f3a0d69646135080553889dfca624252cc612a911dc4d9"},"d3d6684a08caf640183a7c5ebcabc5ae550f9779fb07c5912e966e217e314a33":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var myKeyLookup = Key.FromLookup(this, \"MyKeyLookup\", new KeyLookupOptions {\n AliasName = \"alias/KeyAlias\"\n});\n\nvar role = new Role(this, \"MyRole\", new RoleProps {\n AssumedBy = new ServicePrincipal(\"lambda.amazonaws.com\")\n});\nmyKeyLookup.GrantEncryptDecrypt(role);","version":"1"},"java":{"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);","version":"1"},"go":{"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)","version":"1"},"$":{"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);","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":151}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.IGrantable","@aws-cdk/aws-iam.IPrincipal","@aws-cdk/aws-iam.Role","@aws-cdk/aws-iam.RoleProps","@aws-cdk/aws-iam.ServicePrincipal","@aws-cdk/aws-kms.IKey","@aws-cdk/aws-kms.IKey#grantEncryptDecrypt","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.Key#fromLookup","@aws-cdk/aws-kms.KeyLookupOptions","constructs.Construct"],"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","syntaxKindCounter":{"10":4,"75":14,"104":2,"193":2,"194":5,"196":2,"197":2,"225":2,"226":1,"242":2,"243":2,"281":2},"fqnsFingerprint":"26b3bcee08c2320d35d3665e0008627296a2fcd4b2d7aaf4e601367fbcf34bbd"},"d13662c3a69e47308b1f2a3294ff1820099daece484aca2e49d9d31e56e5268c":{"translations":{"python":{"source":"kms.Key(self, \"MyKey\", trust_account_identities=True)","version":"2"},"csharp":{"source":"new Key(this, \"MyKey\", new KeyProps { TrustAccountIdentities = true });","version":"1"},"java":{"source":"Key.Builder.create(this, \"MyKey\").trustAccountIdentities(true).build();","version":"1"},"go":{"source":"kms.NewKey(this, jsii.String(\"MyKey\"), &KeyProps{\n\tTrustAccountIdentities: jsii.Boolean(true),\n})","version":"1"},"$":{"source":"new kms.Key(this, 'MyKey', { trustAccountIdentities: true });","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":180}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","constructs.Construct"],"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","syntaxKindCounter":{"10":1,"75":3,"104":1,"106":1,"193":1,"194":1,"197":1,"226":1,"281":1},"fqnsFingerprint":"0916683fae71d7975297147cfff0b1a17e9636759086d074aba647a1c232945c"},"1cbc37414aaf63842ec625d105c85480d31650ed3283d25dc08ba2b1f3813f4a":{"translations":{"python":{"source":"key = kms.Key(self, \"MyKey\")\nuser = iam.User(self, \"MyUser\")\nkey.grant_encrypt(user)","version":"2"},"csharp":{"source":"var key = new Key(this, \"MyKey\");\nvar user = new User(this, \"MyUser\");\nkey.GrantEncrypt(user);","version":"1"},"java":{"source":"Key key = new Key(this, \"MyKey\");\nUser user = new User(this, \"MyUser\");\nkey.grantEncrypt(user);","version":"1"},"go":{"source":"key := kms.NewKey(this, jsii.String(\"MyKey\"))\nuser := iam.NewUser(this, jsii.String(\"MyUser\"))\nkey.grantEncrypt(user)","version":"1"},"$":{"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.","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":200}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.IGrantable","@aws-cdk/aws-iam.User","@aws-cdk/aws-kms.Key","constructs.Construct"],"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","syntaxKindCounter":{"10":2,"75":9,"104":2,"194":3,"196":1,"197":2,"225":2,"226":1,"242":2,"243":2},"fqnsFingerprint":"2e2ce15bddd101571710485cad6924dc533901cbf96d6480866b6fe198bb18a3"},"83548013773869deaaff419520eff5f6a8184d387e76d7562ae68d16e4af0ad5":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var myTrustedAdminRole = Role.FromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\nvar key = new Key(this, \"MyKey\", new KeyProps {\n Admins = new [] { myTrustedAdminRole }\n});\n\nvar secondKey = new Key(this, \"MyKey2\");\nsecondKey.GrantAdmin(myTrustedAdminRole);","version":"1"},"java":{"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);","version":"1"},"go":{"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)","version":"1"},"$":{"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);","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":219}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.IGrantable","@aws-cdk/aws-iam.IRole","@aws-cdk/aws-iam.Role","@aws-cdk/aws-iam.Role#fromRoleArn","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.Key#grantAdmin","@aws-cdk/aws-kms.KeyProps","constructs.Construct"],"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","syntaxKindCounter":{"10":4,"75":15,"104":3,"192":1,"193":1,"194":5,"196":2,"197":2,"225":3,"226":1,"242":3,"243":3,"281":1},"fqnsFingerprint":"7a3298ce5529316fdff2b5611008cbb97888d3219c6b92a1a69f6c7cae2dab82"},"67ad2cd93fdfe3e3ec88fb2f373db52724c88e5880e689727c54295c38237296":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var myTrustedAdminRole = Role.FromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\n// Creates a limited admin policy and assigns to the account root.\nvar 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});\nvar key = new Key(this, \"MyKey\", new KeyProps {\n Policy = myCustomPolicy\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-kms"},"field":{"field":"markdown","line":235}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.AccountRootPrincipal","@aws-cdk/aws-iam.IRole","@aws-cdk/aws-iam.PolicyDocument","@aws-cdk/aws-iam.PolicyDocumentProps","@aws-cdk/aws-iam.PolicyStatement","@aws-cdk/aws-iam.PolicyStatementProps","@aws-cdk/aws-iam.Role","@aws-cdk/aws-iam.Role#fromRoleArn","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","constructs.Construct"],"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","syntaxKindCounter":{"10":9,"75":20,"104":2,"192":4,"193":3,"194":6,"196":1,"197":4,"225":3,"242":3,"243":3,"281":5},"fqnsFingerprint":"934404f881a4076b95e1653ee0ba8630dc2e38b336a690d4f27debcc1059e395"},"26ebf12061946d80c1a4c164b44540bc795645fcdeb943e9d99220280ca7c4fc":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"// Passing an encrypted replication bucket created in a different stack.\nvar app = new App();\nvar replicationStack = new Stack(app, \"ReplicationStack\", new StackProps {\n Env = new Environment {\n Region = \"us-west-1\"\n }\n});\nvar key = new Key(replicationStack, \"ReplicationKey\");\nvar alias = new Alias(replicationStack, \"ReplicationAlias\", new AliasProps {\n // aliasName is required\n AliasName = PhysicalName.GENERATE_IF_NEEDED,\n TargetKey = key\n});\nvar replicationBucket = new Bucket(replicationStack, \"ReplicationBucket\", new BucketProps {\n BucketName = PhysicalName.GENERATE_IF_NEEDED,\n EncryptionKey = alias\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.Alias"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Alias","@aws-cdk/aws-kms.AliasProps","@aws-cdk/aws-kms.IKey","@aws-cdk/aws-kms.Key","@aws-cdk/aws-s3.Bucket","@aws-cdk/aws-s3.BucketProps","@aws-cdk/core.App","@aws-cdk/core.Environment","@aws-cdk/core.PhysicalName#GENERATE_IF_NEEDED","@aws-cdk/core.Stack","@aws-cdk/core.StackProps","constructs.Construct"],"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","syntaxKindCounter":{"10":5,"75":29,"193":4,"194":5,"197":5,"225":5,"242":5,"243":5,"281":6},"fqnsFingerprint":"2d48719e0d496742cfc083acd40ed56b694a7203eb571c89489f1cdffd1cbb79"},"124483fdd22883535ad422f403294df9e329b51d6e11a85590ea300e82d8d56f":{"translations":{"python":{"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)","version":"2"},"csharp":{"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\nvar aliasAttributes = new AliasAttributes {\n AliasName = \"aliasName\",\n AliasTargetKey = key\n};","version":"1"},"java":{"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();","version":"1"},"go":{"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}","version":"1"},"$":{"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};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.AliasAttributes"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.AliasAttributes","@aws-cdk/aws-kms.IKey"],"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} }","syntaxKindCounter":{"10":2,"75":10,"130":1,"153":2,"169":2,"193":1,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":2,"290":1},"fqnsFingerprint":"7e7bdea4241afdd79697721fc792f3ca5649862ab580c53a731874c707ed66ef"},"d02e1f802b3da980d2a0bd8f7642d401fc95790f1aad43525ba11a22f961a7ca":{"translations":{"python":{"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)","version":"2"},"csharp":{"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\nvar keyStack = new KeyStack(app, \"KeyStack\");\nnew UseStack(app, \"UseStack\", new UseStackProps { Key = keyStack.Key });","version":"1"},"java":{"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()));","version":"1"},"go":{"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})","version":"1"},"$":{"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 });","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.AliasProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Alias","@aws-cdk/aws-kms.AliasProps","@aws-cdk/aws-kms.IKey","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","@aws-cdk/core.App","@aws-cdk/core.RemovalPolicy","@aws-cdk/core.RemovalPolicy#DESTROY","@aws-cdk/core.Stack","@aws-cdk/core.StackProps","constructs.Construct"],"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","syntaxKindCounter":{"10":5,"57":1,"62":1,"75":55,"102":2,"104":3,"119":1,"138":1,"143":2,"153":5,"156":6,"158":1,"159":1,"162":2,"169":6,"193":3,"194":10,"196":2,"197":4,"209":1,"216":3,"223":2,"225":1,"226":5,"242":1,"243":1,"245":2,"246":1,"279":3,"281":4},"fqnsFingerprint":"dc71a585e1b7712ce79e1bf6ccb15a9dfec364ea15d88ab0a0ec48b01d3cbbdd"},"23462962e75342ccc2cf7daccda75520a17ffa440b12c9d8ca4b842bd2223c0a":{"translations":{"python":{"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)","version":"2"},"csharp":{"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 cfnAlias = new CfnAlias(this, \"MyCfnAlias\", new CfnAliasProps {\n AliasName = \"aliasName\",\n TargetKeyId = \"targetKeyId\"\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.CfnAlias"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.CfnAlias","@aws-cdk/aws-kms.CfnAliasProps","@aws-cdk/core.Construct"],"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} }","syntaxKindCounter":{"10":4,"75":6,"104":1,"193":1,"194":1,"197":1,"225":1,"242":1,"243":1,"254":1,"255":1,"256":1,"281":2,"290":1},"fqnsFingerprint":"6426b27be06797da63b07ccc0b754069065bbee218877aa17e64e9fd45f16163"},"e4237c1da50d4ee2236fceb42eff1a7bb6dbe664ba4741623c4d3607e347a1f7":{"translations":{"python":{"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)","version":"2"},"csharp":{"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 cfnAliasProps = new CfnAliasProps {\n AliasName = \"aliasName\",\n TargetKeyId = \"targetKeyId\"\n};","version":"1"},"java":{"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();","version":"1"},"go":{"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}","version":"1"},"$":{"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};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.CfnAliasProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.CfnAliasProps"],"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} }","syntaxKindCounter":{"10":3,"75":6,"153":1,"169":1,"193":1,"225":1,"242":1,"243":1,"254":1,"255":1,"256":1,"281":2,"290":1},"fqnsFingerprint":"977987add69c5a3950dc3dd453069493c136f4780785c744bc1d763bafd92aaa"},"384855e413cbc1758bb53ec54e4bb9e10c54a4209f2730d1ba6386572691216c":{"translations":{"python":{"source":"# cfn_template: cfn_inc.CfnInclude\n\ncfn_key = cfn_template.get_resource(\"Key\")\nkey = kms.Key.from_cfn_key(cfn_key)","version":"2"},"csharp":{"source":"CfnInclude cfnTemplate;\n\nvar cfnKey = (CfnKey)cfnTemplate.GetResource(\"Key\");\nvar key = Key.FromCfnKey(cfnKey);","version":"1"},"java":{"source":"CfnInclude cfnTemplate;\n\nCfnKey cfnKey = (CfnKey)cfnTemplate.getResource(\"Key\");\nIKey key = Key.fromCfnKey(cfnKey);","version":"1"},"go":{"source":"var cfnTemplate cfnInclude\n\ncfnKey := cfnTemplate.GetResource(jsii.String(\"Key\")).(cfnKey)\nkey := kms.Key_FromCfnKey(cfnKey)","version":"1"},"$":{"source":"declare const cfnTemplate: cfn_inc.CfnInclude;\nconst cfnKey = cfnTemplate.getResource('Key') as kms.CfnKey;\nconst key = kms.Key.fromCfnKey(cfnKey);","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.CfnKey"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.CfnKey","@aws-cdk/aws-kms.IKey","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.Key#fromCfnKey","@aws-cdk/cloudformation-include.CfnInclude#getResource"],"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","syntaxKindCounter":{"10":1,"75":13,"130":1,"153":2,"169":2,"194":3,"196":2,"217":1,"225":3,"242":3,"243":3,"290":1},"fqnsFingerprint":"fd54a4327b856b6ed0852460eb6359882ce10b8ef071048c54b7ae9d15b87e49"},"21b088e0c979214f46f30b775608becf17d34e63c6f76184aa069f8a486a6734":{"translations":{"python":{"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)","version":"2"},"csharp":{"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\nvar 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};","version":"1"},"java":{"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();","version":"1"},"go":{"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}","version":"1"},"$":{"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};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.CfnKeyProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.CfnKeyProps"],"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} }","syntaxKindCounter":{"8":1,"10":6,"75":17,"91":3,"125":1,"130":1,"153":1,"169":1,"192":1,"193":2,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":11,"290":1},"fqnsFingerprint":"a2f392cb842682f388ea00201d0547bfec4482d7cde09b35aed279d4bb743a37"},"dfa581d2885a579059fa407d8b0451610cf923ec1ccbe0772ea929842cfc7a11":{"translations":{"python":{"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)","version":"2"},"csharp":{"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\nvar 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});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.CfnReplicaKey"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.CfnReplicaKey","@aws-cdk/aws-kms.CfnReplicaKeyProps","@aws-cdk/core.Construct"],"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} }","syntaxKindCounter":{"8":1,"10":6,"75":14,"91":1,"104":1,"125":1,"130":1,"192":1,"193":2,"194":1,"197":1,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":8,"290":1},"fqnsFingerprint":"6b391987ddbe204da32a46d2ea70b24293424d929aab2959f81a11636d016fb0"},"4a266d347ed52cdf049f777a6f2f845f5b606b0ddc59c5d2bf9c520ea2da6a2d":{"translations":{"python":{"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)","version":"2"},"csharp":{"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\nvar 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};","version":"1"},"java":{"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();","version":"1"},"go":{"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}","version":"1"},"$":{"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};","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.CfnReplicaKeyProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.CfnReplicaKeyProps"],"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} }","syntaxKindCounter":{"8":1,"10":5,"75":14,"91":1,"125":1,"130":1,"153":1,"169":1,"192":1,"193":2,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":8,"290":1},"fqnsFingerprint":"a967fd184bce7c5284315676bec6412bf0834533a2121e2e31c93b0dd1476c9c"},"20feb012d096f0c765da1ae2e2f883e2285fb042bc59a498f4078470c4a1d911":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.KMS;\n\n\nvar encryptionKey = new Key(this, \"Key\", new KeyProps {\n EnableKeyRotation = true\n});\nvar 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});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.Key"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-dynamodb.Attribute","@aws-cdk/aws-dynamodb.AttributeType","@aws-cdk/aws-dynamodb.AttributeType#STRING","@aws-cdk/aws-dynamodb.Table","@aws-cdk/aws-dynamodb.TableEncryption","@aws-cdk/aws-dynamodb.TableEncryption#CUSTOMER_MANAGED","@aws-cdk/aws-dynamodb.TableProps","@aws-cdk/aws-kms.IKey","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","constructs.Construct"],"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","syntaxKindCounter":{"10":4,"75":19,"104":2,"106":1,"193":3,"194":6,"197":2,"225":2,"242":2,"243":2,"254":1,"255":1,"256":1,"281":5,"282":1,"290":1},"fqnsFingerprint":"76fea3cde1ec69480038a0bc76681f69a6f0c55ff8b27b50b28089f356c5c6cc"},"785368ddb63b0a56d0df9c65ed503a04eadcf8bbdf58c9abcec5500b6f996484":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var myKeyLookup = Key.FromLookup(this, \"MyKeyLookup\", new KeyLookupOptions {\n AliasName = \"alias/KeyAlias\"\n});\n\nvar role = new Role(this, \"MyRole\", new RoleProps {\n AssumedBy = new ServicePrincipal(\"lambda.amazonaws.com\")\n});\nmyKeyLookup.GrantEncryptDecrypt(role);","version":"1"},"java":{"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);","version":"1"},"go":{"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)","version":"1"},"$":{"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);","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.KeyLookupOptions"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.IGrantable","@aws-cdk/aws-iam.IPrincipal","@aws-cdk/aws-iam.Role","@aws-cdk/aws-iam.RoleProps","@aws-cdk/aws-iam.ServicePrincipal","@aws-cdk/aws-kms.IKey","@aws-cdk/aws-kms.IKey#grantEncryptDecrypt","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.Key#fromLookup","@aws-cdk/aws-kms.KeyLookupOptions","constructs.Construct"],"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","syntaxKindCounter":{"10":4,"75":14,"104":2,"193":2,"194":5,"196":2,"197":2,"225":2,"226":1,"242":2,"243":2,"281":2},"fqnsFingerprint":"26b3bcee08c2320d35d3665e0008627296a2fcd4b2d7aaf4e601367fbcf34bbd"},"bc45307f07c49c35aff48981aa4bbe7d62198aab96caea7d47d076161f7273d6":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var myTrustedAdminRole = Role.FromRoleArn(this, \"TrustedRole\", \"arn:aws:iam:....\");\n// Creates a limited admin policy and assigns to the account root.\nvar 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});\nvar key = new Key(this, \"MyKey\", new KeyProps {\n Policy = myCustomPolicy\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.KeyProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.AccountRootPrincipal","@aws-cdk/aws-iam.IRole","@aws-cdk/aws-iam.PolicyDocument","@aws-cdk/aws-iam.PolicyDocumentProps","@aws-cdk/aws-iam.PolicyStatement","@aws-cdk/aws-iam.PolicyStatementProps","@aws-cdk/aws-iam.Role","@aws-cdk/aws-iam.Role#fromRoleArn","@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","constructs.Construct"],"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","syntaxKindCounter":{"10":9,"75":20,"104":2,"192":4,"193":3,"194":6,"196":1,"197":4,"225":3,"242":3,"243":3,"281":5},"fqnsFingerprint":"934404f881a4076b95e1653ee0ba8630dc2e38b336a690d4f27debcc1059e395"},"ed806c245b66c1f79593de4a19334f708d2f52aac88bdb299cdc502c3d7e4b60":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var key = new Key(this, \"MyKey\", new KeyProps {\n KeySpec = KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n KeyUsage = KeyUsage.SIGN_VERIFY\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.KeySpec"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","@aws-cdk/aws-kms.KeySpec","@aws-cdk/aws-kms.KeySpec#ECC_SECG_P256K1","@aws-cdk/aws-kms.KeyUsage","@aws-cdk/aws-kms.KeyUsage#SIGN_VERIFY","constructs.Construct"],"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","syntaxKindCounter":{"10":1,"75":11,"104":1,"193":1,"194":5,"197":1,"225":1,"242":1,"243":1,"281":2},"fqnsFingerprint":"af77273d35526f63dc7723e77516d3dc2a7dd280b2a4cbb1856a56e1d91ae1c7"},"1690e6e81eb7d872549450d8ccaafcb022cd560ed8413d837701d9d8de1638b2":{"translations":{"python":{"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)","version":"2"},"csharp":{"source":"var key = new Key(this, \"MyKey\", new KeyProps {\n KeySpec = KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT\n KeyUsage = KeyUsage.SIGN_VERIFY\n});","version":"1"},"java":{"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();","version":"1"},"go":{"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})","version":"1"},"$":{"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});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.KeyUsage"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-kms.Key","@aws-cdk/aws-kms.KeyProps","@aws-cdk/aws-kms.KeySpec","@aws-cdk/aws-kms.KeySpec#ECC_SECG_P256K1","@aws-cdk/aws-kms.KeyUsage","@aws-cdk/aws-kms.KeyUsage#SIGN_VERIFY","constructs.Construct"],"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","syntaxKindCounter":{"10":1,"75":11,"104":1,"193":1,"194":5,"197":1,"225":1,"242":1,"243":1,"281":2},"fqnsFingerprint":"af77273d35526f63dc7723e77516d3dc2a7dd280b2a4cbb1856a56e1d91ae1c7"},"873716e3f9773fcc360601181158685f0ee754c2cf608e5000a8419820c491c2":{"translations":{"python":{"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)","version":"2"},"csharp":{"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\nvar viaServicePrincipal = new ViaServicePrincipal(\"serviceName\", principal);","version":"1"},"java":{"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);","version":"1"},"go":{"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)","version":"1"},"$":{"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);","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-kms.ViaServicePrincipal"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-iam.IPrincipal","@aws-cdk/aws-kms.ViaServicePrincipal"],"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} }","syntaxKindCounter":{"10":3,"75":9,"130":1,"153":1,"169":1,"194":1,"197":1,"225":2,"242":2,"243":2,"254":2,"255":2,"256":2,"290":1},"fqnsFingerprint":"c3d574ec5c683fb1c778029b3c1d1046b5ef7d384119988989a619b07669cd29"}}} |