UNPKG

@aws-cdk/aws-events

Version:

Amazon EventBridge Construct Library

1 lines 478 kB
{"version":"2","toolVersion":"1.84.0","snippets":{"7cf49f40f663c44c6234d9e5bf65b18c13a6e7329610df601d01a65a8bccd5d7":{"translations":{"python":{"source":"# repo: codecommit.Repository\n# project: codebuild.Project\n\n\non_commit_rule = repo.on_commit(\"OnCommit\",\n target=targets.CodeBuildProject(project),\n branches=[\"master\"]\n)","version":"2"},"csharp":{"source":"Repository repo;\nProject project;\n\n\nvar onCommitRule = repo.OnCommit(\"OnCommit\", new OnCommitOptions {\n Target = new CodeBuildProject(project),\n Branches = new [] { \"master\" }\n});","version":"1"},"java":{"source":"Repository repo;\nProject project;\n\n\nRule onCommitRule = repo.onCommit(\"OnCommit\", OnCommitOptions.builder()\n .target(new CodeBuildProject(project))\n .branches(List.of(\"master\"))\n .build());","version":"1"},"go":{"source":"var repo repository\nvar project project\n\n\nonCommitRule := repo.onCommit(jsii.String(\"OnCommit\"), &OnCommitOptions{\n\tTarget: targets.NewCodeBuildProject(project),\n\tBranches: []*string{\n\t\tjsii.String(\"master\"),\n\t},\n})","version":"1"},"$":{"source":"declare const repo: codecommit.Repository;\ndeclare const project: codebuild.Project;\n\nconst onCommitRule = repo.onCommit('OnCommit', {\n target: new targets.CodeBuildProject(project),\n branches: ['master']\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-events"},"field":{"field":"markdown","line":66}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-codebuild.IProject","@aws-cdk/aws-codecommit.OnCommitOptions","@aws-cdk/aws-events-targets.CodeBuildProject","@aws-cdk/aws-events.IRuleTarget","@aws-cdk/aws-events.Rule"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const repo: codecommit.Repository;\ndeclare const project: codebuild.Project;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as lambda from '@aws-cdk/aws-lambda';\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 onCommitRule = repo.onCommit('OnCommit', {\n target: new targets.CodeBuildProject(project),\n branches: ['master']\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n","syntaxKindCounter":{"10":2,"75":14,"130":2,"153":2,"169":2,"192":1,"193":1,"194":2,"196":1,"197":1,"225":3,"242":3,"243":3,"281":2,"290":1},"fqnsFingerprint":"3fa46bae365388a3aec910d84565560bc386b834f02893ec7f0fb5ca224cc5cd"},"0ff6e72a22dbd36dacd690373116c162c1bd2b4ff43d7d01218d1ac6811c0ab7":{"translations":{"python":{"source":"# on_commit_rule: events.Rule\n# topic: sns.Topic\n\n\non_commit_rule.add_target(targets.SnsTopic(topic,\n message=events.RuleTargetInput.from_text(f\"A commit was pushed to the repository {codecommit.ReferenceEvent.repositoryName} on branch {codecommit.ReferenceEvent.referenceName}\")\n))","version":"2"},"csharp":{"source":"Rule onCommitRule;\nTopic topic;\n\n\nonCommitRule.AddTarget(new SnsTopic(topic, new SnsTopicProps {\n Message = RuleTargetInput.FromText($\"A commit was pushed to the repository {codecommit.ReferenceEvent.repositoryName} on branch {codecommit.ReferenceEvent.referenceName}\")\n}));","version":"1"},"java":{"source":"Rule onCommitRule;\nTopic topic;\n\n\nonCommitRule.addTarget(SnsTopic.Builder.create(topic)\n .message(RuleTargetInput.fromText(String.format(\"A commit was pushed to the repository %s on branch %s\", ReferenceEvent.getRepositoryName(), ReferenceEvent.getReferenceName())))\n .build());","version":"1"},"go":{"source":"var onCommitRule rule\nvar topic topic\n\n\nonCommitRule.AddTarget(targets.NewSnsTopic(topic, &SnsTopicProps{\n\tMessage: events.RuleTargetInput_FromText(\n\tfmt.Sprintf(\"A commit was pushed to the repository %v on branch %v\", codecommit.ReferenceEvent_RepositoryName(), codecommit.ReferenceEvent_ReferenceName())),\n}))","version":"1"},"$":{"source":"declare const onCommitRule: events.Rule;\ndeclare const topic: sns.Topic;\n\nonCommitRule.addTarget(new targets.SnsTopic(topic, {\n message: events.RuleTargetInput.fromText(\n `A commit was pushed to the repository ${codecommit.ReferenceEvent.repositoryName} on branch ${codecommit.ReferenceEvent.referenceName}`\n )\n}));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-events"},"field":{"field":"markdown","line":83}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-events-targets.SnsTopic","@aws-cdk/aws-events-targets.SnsTopicProps","@aws-cdk/aws-events.IRuleTarget","@aws-cdk/aws-events.Rule#addTarget","@aws-cdk/aws-events.RuleTargetInput","@aws-cdk/aws-events.RuleTargetInput#fromText","@aws-cdk/aws-sns.ITopic"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const onCommitRule: events.Rule;\ndeclare const topic: sns.Topic;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as lambda from '@aws-cdk/aws-lambda';\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\nonCommitRule.addTarget(new targets.SnsTopic(topic, {\n message: events.RuleTargetInput.fromText(\n `A commit was pushed to the repository ${codecommit.ReferenceEvent.repositoryName} on branch ${codecommit.ReferenceEvent.referenceName}`\n )\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n","syntaxKindCounter":{"15":1,"16":1,"17":1,"75":21,"130":2,"153":2,"169":2,"193":1,"194":8,"196":2,"197":1,"211":1,"221":2,"225":2,"226":1,"242":2,"243":2,"281":1,"290":1},"fqnsFingerprint":"17f8405b9e7122e4d8512b184bbce81153b50796382b9b3414dcfc406a6c288b"},"8acd9a78f8d185adde2917387febff93e5528fbbc486f4e4718724eadc295dca":{"translations":{"python":{"source":"# on_commit_rule: events.Rule\n# topic: sns.Topic\n\n\non_commit_rule.add_target(targets.SnsTopic(topic,\n message=events.RuleTargetInput.from_object({\n \"DataType\": f\"custom_{events.EventField.fromPath('$.detail-type')}\"\n })\n))","version":"2"},"csharp":{"source":"Rule onCommitRule;\nTopic topic;\n\n\nonCommitRule.AddTarget(new SnsTopic(topic, new SnsTopicProps {\n Message = RuleTargetInput.FromObject(new Dictionary<string, string> {\n { \"DataType\", $\"custom_{events.EventField.fromPath('$.detail-type')}\" }\n })\n}));","version":"1"},"java":{"source":"Rule onCommitRule;\nTopic topic;\n\n\nonCommitRule.addTarget(SnsTopic.Builder.create(topic)\n .message(RuleTargetInput.fromObject(Map.of(\n \"DataType\", String.format(\"custom_%s\", EventField.fromPath(\"$.detail-type\")))))\n .build());","version":"1"},"go":{"source":"var onCommitRule rule\nvar topic topic\n\n\nonCommitRule.AddTarget(targets.NewSnsTopic(topic, &SnsTopicProps{\n\tMessage: events.RuleTargetInput_FromObject(map[string]*string{\n\t\t\"DataType\": fmt.Sprintf(\"custom_%v\", events.EventField_fromPath(jsii.String(\"$.detail-type\"))),\n\t}),\n}))","version":"1"},"$":{"source":"declare const onCommitRule: events.Rule;\ndeclare const topic: sns.Topic;\n\nonCommitRule.addTarget(new targets.SnsTopic(topic, {\n message: events.RuleTargetInput.fromObject(\n {\n DataType: `custom_${events.EventField.fromPath('$.detail-type')}`\n }\n )\n}));","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-events"},"field":{"field":"markdown","line":96}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-events-targets.SnsTopic","@aws-cdk/aws-events-targets.SnsTopicProps","@aws-cdk/aws-events.IRuleTarget","@aws-cdk/aws-events.Rule#addTarget","@aws-cdk/aws-events.RuleTargetInput","@aws-cdk/aws-events.RuleTargetInput#fromObject","@aws-cdk/aws-sns.ITopic"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const onCommitRule: events.Rule;\ndeclare const topic: sns.Topic;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as lambda from '@aws-cdk/aws-lambda';\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\nonCommitRule.addTarget(new targets.SnsTopic(topic, {\n message: events.RuleTargetInput.fromObject(\n {\n DataType: `custom_${events.EventField.fromPath('$.detail-type')}`\n }\n )\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n","syntaxKindCounter":{"10":1,"15":1,"17":1,"75":19,"130":2,"153":2,"169":2,"193":2,"194":6,"196":3,"197":1,"211":1,"221":1,"225":2,"226":1,"242":2,"243":2,"281":2,"290":1},"fqnsFingerprint":"3511f83f4b74b5103c3317670d6d987cc260b6fa124d00da54859d346bf5717b"},"eccf9afcaf8de6691b31152d3661bc14dc7cee02f8010f72354b48b5fa5ed3d8":{"translations":{"python":{"source":"from aws_cdk.aws_events import Rule, Schedule\nfrom aws_cdk.aws_events_targets import EcsTask\nfrom aws_cdk.aws_ecs import Cluster, TaskDefinition\nfrom aws_cdk.aws_iam import Role\n\n# cluster: Cluster\n# task_definition: TaskDefinition\n# role: Role\n\n\necs_task_target = EcsTask(cluster=cluster, task_definition=task_definition, role=role)\n\nRule(self, \"ScheduleRule\",\n schedule=Schedule.cron(minute=\"0\", hour=\"4\"),\n targets=[ecs_task_target]\n)","version":"2"},"csharp":{"source":"using Amazon.CDK.AWS.Events;\nusing Amazon.CDK.AWS.Events.Targets;\nusing Amazon.CDK.AWS.ECS;\nusing Amazon.CDK.AWS.IAM;\n\nCluster cluster;\nTaskDefinition taskDefinition;\nRole role;\n\n\nvar ecsTaskTarget = new EcsTask(new EcsTaskProps { Cluster = cluster, TaskDefinition = taskDefinition, Role = role });\n\nnew Rule(this, \"ScheduleRule\", new RuleProps {\n Schedule = Schedule.Cron(new CronOptions { Minute = \"0\", Hour = \"4\" }),\n Targets = new [] { ecsTaskTarget }\n});","version":"1"},"java":{"source":"import software.amazon.awscdk.services.events.Rule;\nimport software.amazon.awscdk.services.events.Schedule;\nimport software.amazon.awscdk.services.events.targets.EcsTask;\nimport software.amazon.awscdk.services.ecs.Cluster;\nimport software.amazon.awscdk.services.ecs.TaskDefinition;\nimport software.amazon.awscdk.services.iam.Role;\n\nCluster cluster;\nTaskDefinition taskDefinition;\nRole role;\n\n\nEcsTask ecsTaskTarget = EcsTask.Builder.create().cluster(cluster).taskDefinition(taskDefinition).role(role).build();\n\nRule.Builder.create(this, \"ScheduleRule\")\n .schedule(Schedule.cron(CronOptions.builder().minute(\"0\").hour(\"4\").build()))\n .targets(List.of(ecsTaskTarget))\n .build();","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/awscdkawsevents\"\nimport \"github.com/aws-samples/dummy/awscdkawseventstargets\"\nimport \"github.com/aws-samples/dummy/awscdkawsecs\"\nimport \"github.com/aws-samples/dummy/awscdkawsiam\"\n\nvar cluster cluster\nvar taskDefinition taskDefinition\nvar role role\n\n\necsTaskTarget := awscdkawseventstargets.NewEcsTask(&EcsTaskProps{\n\tCluster: Cluster,\n\tTaskDefinition: TaskDefinition,\n\tRole: Role,\n})\n\nawscdkawsevents.NewRule(this, jsii.String(\"ScheduleRule\"), &RuleProps{\n\tSchedule: *awscdkawsevents.Schedule_Cron(&CronOptions{\n\t\tMinute: jsii.String(\"0\"),\n\t\tHour: jsii.String(\"4\"),\n\t}),\n\tTargets: []iRuleTarget{\n\t\tecsTaskTarget,\n\t},\n})","version":"1"},"$":{"source":"import { Rule, Schedule } from '@aws-cdk/aws-events';\nimport { EcsTask } from '@aws-cdk/aws-events-targets';\nimport { Cluster, TaskDefinition } from '@aws-cdk/aws-ecs';\nimport { Role } from '@aws-cdk/aws-iam';\n\ndeclare const cluster: Cluster;\ndeclare const taskDefinition: TaskDefinition;\ndeclare const role: Role;\n\nconst ecsTaskTarget = new EcsTask({ cluster, taskDefinition, role });\n\nnew Rule(this, 'ScheduleRule', {\n schedule: Schedule.cron({ minute: '0', hour: '4' }),\n targets: [ecsTaskTarget],\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-events"},"field":{"field":"markdown","line":116}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ecs.ICluster","@aws-cdk/aws-ecs.ITaskDefinition","@aws-cdk/aws-events-targets.EcsTask","@aws-cdk/aws-events-targets.EcsTaskProps","@aws-cdk/aws-events.CronOptions","@aws-cdk/aws-events.Rule","@aws-cdk/aws-events.RuleProps","@aws-cdk/aws-events.Schedule","@aws-cdk/aws-events.Schedule#cron","@aws-cdk/aws-iam.IRole","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\nimport { Rule, Schedule } from '@aws-cdk/aws-events';\nimport { EcsTask } from '@aws-cdk/aws-events-targets';\nimport { Cluster, TaskDefinition } from '@aws-cdk/aws-ecs';\nimport { Role } from '@aws-cdk/aws-iam';\n\ndeclare const cluster: Cluster;\ndeclare const taskDefinition: TaskDefinition;\ndeclare const role: Role;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\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 ecsTaskTarget = new EcsTask({ cluster, taskDefinition, role });\n\nnew Rule(this, 'ScheduleRule', {\n schedule: Schedule.cron({ minute: '0', hour: '4' }),\n targets: [ecsTaskTarget],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n","syntaxKindCounter":{"10":7,"75":25,"104":1,"130":3,"169":3,"192":1,"193":3,"194":1,"196":1,"197":2,"225":4,"226":1,"242":4,"243":4,"254":4,"255":4,"257":4,"258":6,"281":4,"282":3,"290":1},"fqnsFingerprint":"ba24d6b0c94156cd4cbeed8deb6d72affe5a486be7ee873dd16d6ed01058f37a"},"fc9533bb39108e00dfa980b5b1c40dfe71ad2e992477c5bac2208bf6ca78c9d5":{"translations":{"python":{"source":"# cluster: ecs.Cluster\n# task_definition: ecs.TaskDefinition\n# role: iam.Role\n\n\nplatform_version = ecs.FargatePlatformVersion.VERSION1_4\necs_task_target = targets.EcsTask(cluster=cluster, task_definition=task_definition, role=role, platform_version=platform_version)","version":"2"},"csharp":{"source":"Cluster cluster;\nTaskDefinition taskDefinition;\nRole role;\n\n\nvar platformVersion = FargatePlatformVersion.VERSION1_4;\nvar ecsTaskTarget = new EcsTask(new EcsTaskProps { Cluster = cluster, TaskDefinition = taskDefinition, Role = role, PlatformVersion = platformVersion });","version":"1"},"java":{"source":"Cluster cluster;\nTaskDefinition taskDefinition;\nRole role;\n\n\nFargatePlatformVersion platformVersion = FargatePlatformVersion.VERSION1_4;\nEcsTask ecsTaskTarget = EcsTask.Builder.create().cluster(cluster).taskDefinition(taskDefinition).role(role).platformVersion(platformVersion).build();","version":"1"},"go":{"source":"var cluster cluster\nvar taskDefinition taskDefinition\nvar role role\n\n\nplatformVersion := ecs.FargatePlatformVersion_VERSION1_4\necsTaskTarget := targets.NewEcsTask(&EcsTaskProps{\n\tCluster: Cluster,\n\tTaskDefinition: TaskDefinition,\n\tRole: Role,\n\tPlatformVersion: PlatformVersion,\n})","version":"1"},"$":{"source":"declare const cluster: ecs.Cluster;\ndeclare const taskDefinition: ecs.TaskDefinition;\ndeclare const role: iam.Role;\n\nconst platformVersion = ecs.FargatePlatformVersion.VERSION1_4;\nconst ecsTaskTarget = new targets.EcsTask({ cluster, taskDefinition, role, platformVersion });","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-events"},"field":{"field":"markdown","line":136}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-ecs.FargatePlatformVersion","@aws-cdk/aws-ecs.FargatePlatformVersion#VERSION1_4","@aws-cdk/aws-ecs.ICluster","@aws-cdk/aws-ecs.ITaskDefinition","@aws-cdk/aws-events-targets.EcsTask","@aws-cdk/aws-events-targets.EcsTaskProps","@aws-cdk/aws-iam.IRole"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const cluster: ecs.Cluster;\ndeclare const taskDefinition: ecs.TaskDefinition;\ndeclare const role: iam.Role;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as lambda from '@aws-cdk/aws-lambda';\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 platformVersion = ecs.FargatePlatformVersion.VERSION1_4;\nconst ecsTaskTarget = new targets.EcsTask({ cluster, taskDefinition, role, platformVersion });\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n","syntaxKindCounter":{"75":20,"130":3,"153":3,"169":3,"193":1,"194":3,"197":1,"225":5,"242":5,"243":5,"282":4,"290":1},"fqnsFingerprint":"029e1e71468bba3704ceee73794a8170855cdc586b334946a17e190ec0b8d4aa"},"cb3ed42d1e89aa602607c9052cd892132b3e488d3a8a51142ae4d813b3e1bcc7":{"translations":{"python":{"source":"from aws_cdk.core import Environment, Environment\nfrom aws_cdk.core import App, Stack\nimport aws_cdk.aws_codebuild as codebuild\nimport aws_cdk.aws_codecommit as codecommit\nimport aws_cdk.aws_events_targets as targets\n\napp = App()\n\naccount1 = \"11111111111\"\naccount2 = \"22222222222\"\n\nstack1 = Stack(app, \"Stack1\", env=Environment(account=account1, region=\"us-west-1\"))\nrepo = codecommit.Repository(stack1, \"Repository\",\n repository_name=\"myrepository\"\n)\n\nstack2 = Stack(app, \"Stack2\", env=Environment(account=account2, region=\"us-east-1\"))\nproject = codebuild.Project(stack2, \"Project\")\n\nrepo.on_commit(\"OnCommit\",\n target=targets.CodeBuildProject(project)\n)","version":"2"},"csharp":{"source":"using Amazon.CDK;\nusing Amazon.CDK.AWS.CodeBuild;\nusing Amazon.CDK.AWS.CodeCommit;\nusing Amazon.CDK.AWS.Events.Targets;\n\nvar app = new App();\n\nvar account1 = \"11111111111\";\nvar account2 = \"22222222222\";\n\nvar stack1 = new Stack(app, \"Stack1\", new StackProps { Env = new Environment { Account = account1, Region = \"us-west-1\" } });\nvar repo = new Repository(stack1, \"Repository\", new RepositoryProps {\n RepositoryName = \"myrepository\"\n});\n\nvar stack2 = new Stack(app, \"Stack2\", new StackProps { Env = new Environment { Account = account2, Region = \"us-east-1\" } });\nvar project = new Project(stack2, \"Project\", new ProjectProps { });\n\nrepo.OnCommit(\"OnCommit\", new OnCommitOptions {\n Target = new CodeBuildProject(project)\n});","version":"1"},"java":{"source":"import software.amazon.awscdk.core.App;\nimport software.amazon.awscdk.core.Stack;\nimport software.amazon.awscdk.services.codebuild.*;\nimport software.amazon.awscdk.services.codecommit.*;\nimport software.amazon.awscdk.services.events.targets.*;\n\nApp app = new App();\n\nString account1 = \"11111111111\";\nString account2 = \"22222222222\";\n\nStack stack1 = Stack.Builder.create(app, \"Stack1\").env(Environment.builder().account(account1).region(\"us-west-1\").build()).build();\nRepository repo = Repository.Builder.create(stack1, \"Repository\")\n .repositoryName(\"myrepository\")\n .build();\n\nStack stack2 = Stack.Builder.create(app, \"Stack2\").env(Environment.builder().account(account2).region(\"us-east-1\").build()).build();\nProject project = Project.Builder.create(stack2, \"Project\").build();\n\nrepo.onCommit(\"OnCommit\", OnCommitOptions.builder()\n .target(new CodeBuildProject(project))\n .build());","version":"1"},"go":{"source":"import \"github.com/aws-samples/dummy/awscdkcore\"\nimport codebuild \"github.com/aws-samples/dummy/awscdkawscodebuild\"\nimport codecommit \"github.com/aws-samples/dummy/awscdkawscodecommit\"\nimport targets \"github.com/aws-samples/dummy/awscdkawseventstargets\"\n\napp := awscdkcore.NewApp()\n\naccount1 := \"11111111111\"\naccount2 := \"22222222222\"\n\nstack1 := awscdkcore.NewStack(app, jsii.String(\"Stack1\"), &StackProps{\n\tEnv: &Environment{\n\t\tAccount: account1,\n\t\tRegion: jsii.String(\"us-west-1\"),\n\t},\n})\nrepo := codecommit.NewRepository(stack1, jsii.String(\"Repository\"), &RepositoryProps{\n\tRepositoryName: jsii.String(\"myrepository\"),\n})\n\nstack2 := awscdkcore.NewStack(app, jsii.String(\"Stack2\"), &StackProps{\n\tEnv: &Environment{\n\t\tAccount: account2,\n\t\tRegion: jsii.String(\"us-east-1\"),\n\t},\n})\nproject := codebuild.NewProject(stack2, jsii.String(\"Project\"), &ProjectProps{\n})\n\nrepo.onCommit(jsii.String(\"OnCommit\"), &OnCommitOptions{\n\tTarget: targets.NewCodeBuildProject(project),\n})","version":"1"},"$":{"source":"import { App, Stack } from '@aws-cdk/core';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as targets from '@aws-cdk/aws-events-targets';\n\nconst app = new App();\n\nconst account1 = '11111111111';\nconst account2 = '22222222222';\n\nconst stack1 = new Stack(app, 'Stack1', { env: { account: account1, region: 'us-west-1' } });\nconst repo = new codecommit.Repository(stack1, 'Repository', {\n repositoryName: 'myrepository',\n});\n\nconst stack2 = new Stack(app, 'Stack2', { env: { account: account2, region: 'us-east-1' } });\nconst project = new codebuild.Project(stack2, 'Project', {\n // ...\n});\n\nrepo.onCommit('OnCommit', {\n target: new targets.CodeBuildProject(project),\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-events"},"field":{"field":"markdown","line":168}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-codebuild.IProject","@aws-cdk/aws-codebuild.Project","@aws-cdk/aws-codebuild.ProjectProps","@aws-cdk/aws-codecommit.OnCommitOptions","@aws-cdk/aws-codecommit.Repository","@aws-cdk/aws-codecommit.RepositoryProps","@aws-cdk/aws-events-targets.CodeBuildProject","@aws-cdk/aws-events.IRuleTarget","@aws-cdk/core.App","@aws-cdk/core.Environment","@aws-cdk/core.Stack","@aws-cdk/core.StackProps","constructs.Construct"],"fullSource":"import { App, Stack } from '@aws-cdk/core';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as targets from '@aws-cdk/aws-events-targets';\n\nconst app = new App();\n\nconst account1 = '11111111111';\nconst account2 = '22222222222';\n\nconst stack1 = new Stack(app, 'Stack1', { env: { account: account1, region: 'us-west-1' } });\nconst repo = new codecommit.Repository(stack1, 'Repository', {\n repositoryName: 'myrepository',\n});\n\nconst stack2 = new Stack(app, 'Stack2', { env: { account: account2, region: 'us-east-1' } });\nconst project = new codebuild.Project(stack2, 'Project', {\n // ...\n});\n\nrepo.onCommit('OnCommit', {\n target: new targets.CodeBuildProject(project),\n});","syntaxKindCounter":{"10":14,"75":38,"193":7,"194":4,"196":1,"197":6,"225":7,"226":1,"242":7,"243":7,"254":4,"255":4,"256":3,"257":1,"258":2,"281":8,"290":1},"fqnsFingerprint":"09632f428cedda1b41d21e19447255e54543c39ad6e2768a1d22ffd34059ccff"},"9b906e679698ac5a36a82dbffb362b7397ae5c64753e3a4b41310b70c1be19a7":{"translations":{"python":{"source":"bus = events.EventBus(self, \"bus\",\n event_bus_name=\"MyCustomEventBus\"\n)\n\nbus.archive(\"MyArchive\",\n archive_name=\"MyCustomEventBusArchive\",\n description=\"MyCustomerEventBus Archive\",\n event_pattern=events.EventPattern(\n account=[Stack.of(self).account]\n ),\n retention=Duration.days(365)\n)","version":"2"},"csharp":{"source":"var bus = new EventBus(this, \"bus\", new EventBusProps {\n EventBusName = \"MyCustomEventBus\"\n});\n\nbus.Archive(\"MyArchive\", new BaseArchiveProps {\n ArchiveName = \"MyCustomEventBusArchive\",\n Description = \"MyCustomerEventBus Archive\",\n EventPattern = new EventPattern {\n Account = new [] { Stack.Of(this).Account }\n },\n Retention = Duration.Days(365)\n});","version":"1"},"java":{"source":"EventBus bus = EventBus.Builder.create(this, \"bus\")\n .eventBusName(\"MyCustomEventBus\")\n .build();\n\nbus.archive(\"MyArchive\", BaseArchiveProps.builder()\n .archiveName(\"MyCustomEventBusArchive\")\n .description(\"MyCustomerEventBus Archive\")\n .eventPattern(EventPattern.builder()\n .account(List.of(Stack.of(this).getAccount()))\n .build())\n .retention(Duration.days(365))\n .build());","version":"1"},"go":{"source":"bus := events.NewEventBus(this, jsii.String(\"bus\"), &EventBusProps{\n\tEventBusName: jsii.String(\"MyCustomEventBus\"),\n})\n\nbus.archive(jsii.String(\"MyArchive\"), &BaseArchiveProps{\n\tArchiveName: jsii.String(\"MyCustomEventBusArchive\"),\n\tDescription: jsii.String(\"MyCustomerEventBus Archive\"),\n\tEventPattern: &EventPattern{\n\t\tAccount: []*string{\n\t\t\tawscdkcore.*stack_Of(this).Account,\n\t\t},\n\t},\n\tRetention: *awscdkcore.Duration_Days(jsii.Number(365)),\n})","version":"1"},"$":{"source":"const bus = new events.EventBus(this, 'bus', {\n eventBusName: 'MyCustomEventBus'\n});\n\nbus.archive('MyArchive', {\n archiveName: 'MyCustomEventBusArchive',\n description: 'MyCustomerEventBus Archive',\n eventPattern: {\n account: [Stack.of(this).account],\n },\n retention: Duration.days(365),\n});","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-events"},"field":{"field":"markdown","line":209}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-events.BaseArchiveProps","@aws-cdk/aws-events.EventBus","@aws-cdk/aws-events.EventBusProps","@aws-cdk/aws-events.EventPattern","@aws-cdk/core.Duration","@aws-cdk/core.Duration#days","@aws-cdk/core.Stack#account","@aws-cdk/core.Stack#of","constructs.Construct","constructs.IConstruct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as lambda from '@aws-cdk/aws-lambda';\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 bus = new events.EventBus(this, 'bus', {\n eventBusName: 'MyCustomEventBus'\n});\n\nbus.archive('MyArchive', {\n archiveName: 'MyCustomEventBusArchive',\n description: 'MyCustomerEventBus Archive',\n eventPattern: {\n account: [Stack.of(this).account],\n },\n retention: Duration.days(365),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n","syntaxKindCounter":{"8":1,"10":5,"75":16,"104":2,"192":1,"193":3,"194":5,"196":3,"197":1,"225":1,"226":1,"242":1,"243":1,"281":6},"fqnsFingerprint":"98cfc4f90538e7e7737f60dde4b05937b3efc52f6dd21be1608fb35c2be48875"},"8b5cf83c5bb4b90175ce2c38aaa59de642928ef4d0c277ccebc7f0e17d8196fa":{"translations":{"python":{"source":"# lambda_function: lambda.Function\n\n\nevent_bus = events.EventBus.from_event_bus_arn(self, \"ImportedEventBus\", \"arn:aws:events:us-east-1:111111111:event-bus/my-event-bus\")\n\n# now you can just call methods on the eventbus\nevent_bus.grant_put_events_to(lambda_function)","version":"2"},"csharp":{"source":"Function lambdaFunction;\n\n\nvar eventBus = EventBus.FromEventBusArn(this, \"ImportedEventBus\", \"arn:aws:events:us-east-1:111111111:event-bus/my-event-bus\");\n\n// now you can just call methods on the eventbus\neventBus.GrantPutEventsTo(lambdaFunction);","version":"1"},"java":{"source":"Function lambdaFunction;\n\n\nIEventBus eventBus = EventBus.fromEventBusArn(this, \"ImportedEventBus\", \"arn:aws:events:us-east-1:111111111:event-bus/my-event-bus\");\n\n// now you can just call methods on the eventbus\neventBus.grantPutEventsTo(lambdaFunction);","version":"1"},"go":{"source":"var lambdaFunction function\n\n\neventBus := events.EventBus_FromEventBusArn(this, jsii.String(\"ImportedEventBus\"), jsii.String(\"arn:aws:events:us-east-1:111111111:event-bus/my-event-bus\"))\n\n// now you can just call methods on the eventbus\neventBus.GrantPutEventsTo(lambdaFunction)","version":"1"},"$":{"source":"declare const lambdaFunction: lambda.Function;\n\nconst eventBus = events.EventBus.fromEventBusArn(this, 'ImportedEventBus', 'arn:aws:events:us-east-1:111111111:event-bus/my-event-bus');\n\n// now you can just call methods on the eventbus\neventBus.grantPutEventsTo(lambdaFunction);","version":"0"}},"location":{"api":{"api":"moduleReadme","moduleFqn":"@aws-cdk/aws-events"},"field":{"field":"markdown","line":231}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-events.EventBus","@aws-cdk/aws-events.EventBus#fromEventBusArn","@aws-cdk/aws-events.IEventBus","@aws-cdk/aws-events.IEventBus#grantPutEventsTo","@aws-cdk/aws-iam.IGrantable","constructs.Construct"],"fullSource":"// Hoisted imports begin after !show marker below\n/// !show\ndeclare const lambdaFunction: lambda.Function;\n/// !hide\n// Hoisted imports ended before !hide marker above\n// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack, Duration } from '@aws-cdk/core';\nimport * as events from '@aws-cdk/aws-events';\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as codecommit from '@aws-cdk/aws-codecommit';\nimport * as codebuild from '@aws-cdk/aws-codebuild';\nimport * as sns from '@aws-cdk/aws-sns';\nimport * as ecs from '@aws-cdk/aws-ecs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as lambda from '@aws-cdk/aws-lambda';\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 eventBus = events.EventBus.fromEventBusArn(this, 'ImportedEventBus', 'arn:aws:events:us-east-1:111111111:event-bus/my-event-bus');\n\n// now you can just call methods on the eventbus\neventBus.grantPutEventsTo(lambdaFunction);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n","syntaxKindCounter":{"10":2,"75":10,"104":1,"130":1,"153":1,"169":1,"194":3,"196":2,"225":2,"226":1,"242":2,"243":2,"290":1},"fqnsFingerprint":"8db980964baf4859035a60e213d68b67d2fec7577bdccde8332832c545ed0fb9"},"a4827dbeee1582d0bb87d1ecadcb5b55214df35b9893403fde11829245c840cb":{"translations":{"python":{"source":"connection = events.Connection(self, \"Connection\",\n authorization=events.Authorization.api_key(\"x-api-key\", SecretValue.secrets_manager(\"ApiSecretName\")),\n description=\"Connection with API Key x-api-key\"\n)\n\ndestination = events.ApiDestination(self, \"Destination\",\n connection=connection,\n endpoint=\"https://example.com\",\n description=\"Calling example.com with API key x-api-key\"\n)\n\nrule = events.Rule(self, \"Rule\",\n schedule=events.Schedule.rate(cdk.Duration.minutes(1)),\n targets=[targets.ApiDestination(destination)]\n)","version":"2"},"csharp":{"source":"var connection = new Connection(this, \"Connection\", new ConnectionProps {\n Authorization = Authorization.ApiKey(\"x-api-key\", SecretValue.SecretsManager(\"ApiSecretName\")),\n Description = \"Connection with API Key x-api-key\"\n});\n\nvar destination = new ApiDestination(this, \"Destination\", new ApiDestinationProps {\n Connection = connection,\n Endpoint = \"https://example.com\",\n Description = \"Calling example.com with API key x-api-key\"\n});\n\nvar rule = new Rule(this, \"Rule\", new RuleProps {\n Schedule = Schedule.Rate(Duration.Minutes(1)),\n Targets = new [] { new ApiDestination(destination) }\n});","version":"1"},"java":{"source":"Connection connection = Connection.Builder.create(this, \"Connection\")\n .authorization(Authorization.apiKey(\"x-api-key\", SecretValue.secretsManager(\"ApiSecretName\")))\n .description(\"Connection with API Key x-api-key\")\n .build();\n\nApiDestination destination = ApiDestination.Builder.create(this, \"Destination\")\n .connection(connection)\n .endpoint(\"https://example.com\")\n .description(\"Calling example.com with API key x-api-key\")\n .build();\n\nRule rule = Rule.Builder.create(this, \"Rule\")\n .schedule(Schedule.rate(Duration.minutes(1)))\n .targets(List.of(new ApiDestination(destination)))\n .build();","version":"1"},"go":{"source":"connection := events.NewConnection(this, jsii.String(\"Connection\"), &ConnectionProps{\n\tAuthorization: events.Authorization_ApiKey(jsii.String(\"x-api-key\"), awscdkcore.SecretValue_SecretsManager(jsii.String(\"ApiSecretName\"))),\n\tDescription: jsii.String(\"Connection with API Key x-api-key\"),\n})\n\ndestination := events.NewApiDestination(this, jsii.String(\"Destination\"), &ApiDestinationProps{\n\tConnection: Connection,\n\tEndpoint: jsii.String(\"https://example.com\"),\n\tDescription: jsii.String(\"Calling example.com with API key x-api-key\"),\n})\n\nrule := events.NewRule(this, jsii.String(\"Rule\"), &RuleProps{\n\tSchedule: events.Schedule_Rate(cdk.Duration_Minutes(jsii.Number(1))),\n\tTargets: []iRuleTarget{\n\t\ttargets.NewApiDestination(destination),\n\t},\n})","version":"1"},"$":{"source":"const connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-events.ApiDestination"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-events-targets.ApiDestination","@aws-cdk/aws-events.ApiDestination","@aws-cdk/aws-events.ApiDestinationProps","@aws-cdk/aws-events.Authorization","@aws-cdk/aws-events.Authorization#apiKey","@aws-cdk/aws-events.Connection","@aws-cdk/aws-events.ConnectionProps","@aws-cdk/aws-events.IApiDestination","@aws-cdk/aws-events.IConnection","@aws-cdk/aws-events.Rule","@aws-cdk/aws-events.RuleProps","@aws-cdk/aws-events.Schedule","@aws-cdk/aws-events.Schedule#rate","@aws-cdk/core.Duration","@aws-cdk/core.Duration#minutes","@aws-cdk/core.SecretValue","@aws-cdk/core.SecretValue#secretsManager","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Duration, RemovalPolicy, SecretValue, Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\n\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as events from '@aws-cdk/aws-events';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as cdk from '@aws-cdk/core';\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 connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"8":1,"10":8,"75":30,"104":3,"192":1,"193":3,"194":11,"196":4,"197":4,"225":3,"242":3,"243":3,"281":6,"282":1},"fqnsFingerprint":"c132d3110db5dfcd2d75d88a3612c8422c27dd0eababf983aadbfe0f227d6745"},"c8275deddeed5cd49edb8c21a818c2b3d1bd40389befb97dd8166e2ccb80f9f4":{"translations":{"python":{"source":"connection = events.Connection(self, \"Connection\",\n authorization=events.Authorization.api_key(\"x-api-key\", SecretValue.secrets_manager(\"ApiSecretName\")),\n description=\"Connection with API Key x-api-key\"\n)\n\ndestination = events.ApiDestination(self, \"Destination\",\n connection=connection,\n endpoint=\"https://example.com\",\n description=\"Calling example.com with API key x-api-key\"\n)\n\nrule = events.Rule(self, \"Rule\",\n schedule=events.Schedule.rate(cdk.Duration.minutes(1)),\n targets=[targets.ApiDestination(destination)]\n)","version":"2"},"csharp":{"source":"var connection = new Connection(this, \"Connection\", new ConnectionProps {\n Authorization = Authorization.ApiKey(\"x-api-key\", SecretValue.SecretsManager(\"ApiSecretName\")),\n Description = \"Connection with API Key x-api-key\"\n});\n\nvar destination = new ApiDestination(this, \"Destination\", new ApiDestinationProps {\n Connection = connection,\n Endpoint = \"https://example.com\",\n Description = \"Calling example.com with API key x-api-key\"\n});\n\nvar rule = new Rule(this, \"Rule\", new RuleProps {\n Schedule = Schedule.Rate(Duration.Minutes(1)),\n Targets = new [] { new ApiDestination(destination) }\n});","version":"1"},"java":{"source":"Connection connection = Connection.Builder.create(this, \"Connection\")\n .authorization(Authorization.apiKey(\"x-api-key\", SecretValue.secretsManager(\"ApiSecretName\")))\n .description(\"Connection with API Key x-api-key\")\n .build();\n\nApiDestination destination = ApiDestination.Builder.create(this, \"Destination\")\n .connection(connection)\n .endpoint(\"https://example.com\")\n .description(\"Calling example.com with API key x-api-key\")\n .build();\n\nRule rule = Rule.Builder.create(this, \"Rule\")\n .schedule(Schedule.rate(Duration.minutes(1)))\n .targets(List.of(new ApiDestination(destination)))\n .build();","version":"1"},"go":{"source":"connection := events.NewConnection(this, jsii.String(\"Connection\"), &ConnectionProps{\n\tAuthorization: events.Authorization_ApiKey(jsii.String(\"x-api-key\"), awscdkcore.SecretValue_SecretsManager(jsii.String(\"ApiSecretName\"))),\n\tDescription: jsii.String(\"Connection with API Key x-api-key\"),\n})\n\ndestination := events.NewApiDestination(this, jsii.String(\"Destination\"), &ApiDestinationProps{\n\tConnection: Connection,\n\tEndpoint: jsii.String(\"https://example.com\"),\n\tDescription: jsii.String(\"Calling example.com with API key x-api-key\"),\n})\n\nrule := events.NewRule(this, jsii.String(\"Rule\"), &RuleProps{\n\tSchedule: events.Schedule_Rate(cdk.Duration_Minutes(jsii.Number(1))),\n\tTargets: []iRuleTarget{\n\t\ttargets.NewApiDestination(destination),\n\t},\n})","version":"1"},"$":{"source":"const connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-events.ApiDestinationProps"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-events-targets.ApiDestination","@aws-cdk/aws-events.ApiDestination","@aws-cdk/aws-events.ApiDestinationProps","@aws-cdk/aws-events.Authorization","@aws-cdk/aws-events.Authorization#apiKey","@aws-cdk/aws-events.Connection","@aws-cdk/aws-events.ConnectionProps","@aws-cdk/aws-events.IApiDestination","@aws-cdk/aws-events.IConnection","@aws-cdk/aws-events.Rule","@aws-cdk/aws-events.RuleProps","@aws-cdk/aws-events.Schedule","@aws-cdk/aws-events.Schedule#rate","@aws-cdk/core.Duration","@aws-cdk/core.Duration#minutes","@aws-cdk/core.SecretValue","@aws-cdk/core.SecretValue#secretsManager","constructs.Construct"],"fullSource":"// Fixture with packages imported, but nothing else\nimport { Duration, RemovalPolicy, SecretValue, Stack } from '@aws-cdk/core';\nimport { Construct } from 'constructs';\n\nimport * as targets from '@aws-cdk/aws-events-targets';\nimport * as events from '@aws-cdk/aws-events';\nimport * as sqs from '@aws-cdk/aws-sqs';\nimport * as cdk from '@aws-cdk/core';\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 connection = new events.Connection(this, 'Connection', {\n authorization: events.Authorization.apiKey('x-api-key', SecretValue.secretsManager('ApiSecretName')),\n description: 'Connection with API Key x-api-key',\n});\n\nconst destination = new events.ApiDestination(this, 'Destination', {\n connection,\n endpoint: 'https://example.com',\n description: 'Calling example.com with API key x-api-key',\n});\n\nconst rule = new events.Rule(this, 'Rule', {\n schedule: events.Schedule.rate(cdk.Duration.minutes(1)),\n targets: [new targets.ApiDestination(destination)],\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n","syntaxKindCounter":{"8":1,"10":8,"75":30,"104":3,"192":1,"193":3,"194":11,"196":4,"197":4,"225":3,"242":3,"243":3,"281":6,"282":1},"fqnsFingerprint":"c132d3110db5dfcd2d75d88a3612c8422c27dd0eababf983aadbfe0f227d6745"},"3bfa4880a9c7066e6c40c8a52777eb616b63d2a331c6d5960ae5081f2f8d43af":{"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_events as events\nimport aws_cdk.core as cdk\n\n# detail: Any\n# event_bus: events.EventBus\n\narchive = events.Archive(self, \"MyArchive\",\n event_pattern=events.EventPattern(\n account=[\"account\"],\n detail={\n \"detail_key\": detail\n },\n detail_type=[\"detailType\"],\n id=[\"id\"],\n region=[\"region\"],\n resources=[\"resources\"],\n source=[\"source\"],\n time=[\"time\"],\n version=[\"version\"]\n ),\n source_event_bus=event_bus,\n\n # the properties below are optional\n archive_name=\"archiveName\",\n description=\"description\",\n retention=cdk.Duration.minutes(30)\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.Events;\nusing Amazon.CDK;\n\nvar detail;\nEventBus eventBus;\nvar archive = new Archive(this, \"MyArchive\", new ArchiveProps {\n EventPattern = new EventPattern {\n Account = new [] { \"account\" },\n Detail = new Dictionary<string, object> {\n { \"detailKey\", detail }\n },\n DetailType = new [] { \"detailType\" },\n Id = new [] { \"id\" },\n Region = new [] { \"region\" },\n Resources = new [] { \"resources\" },\n Source = new [] { \"source\" },\n Time = new [] { \"time\" },\n Version = new [] { \"version\" }\n },\n SourceEventBus = eventBus,\n\n // the properties below are optional\n ArchiveName = \"archiveName\",\n Description = \"description\",\n Retention = Duration.Minutes(30)\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.events.*;\nimport software.amazon.awscdk.core.*;\n\nObject detail;\nEventBus eventBus;\n\nArchive archive = Archive.Builder.create(this, \"MyArchive\")\n .eventPattern(EventPattern.builder()\n .account(List.of(\"account\"))\n .detail(Map.of(\n \"detailKey\", detail))\n .detailType(List.of(\"detailType\"))\n .id(List.of(\"id\"))\n .region(List.of(\"region\"))\n .resources(List.of(\"resources\"))\n .source(List.of(\"source\"))\n .time(List.of(\"time\"))\n .version(List.of(\"version\"))\n .build())\n .sourceEventBus(eventBus)\n\n // the properties below are optional\n .archiveName(\"archiveName\")\n .description(\"description\")\n .retention(Duration.minutes(30))\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 events \"github.com/aws-samples/dummy/awscdkawsevents\"\nimport cdk \"github.com/aws-samples/dummy/awscdkcore\"\n\nvar detail interface{}\nvar eventBus eventBus\n\narchive := events.NewArchive(this, jsii.String(\"MyArchive\"), &ArchiveProps{\n\tEventPattern: &EventPattern{\n\t\tAccount: []*string{\n\t\t\tjsii.String(\"account\"),\n\t\t},\n\t\tDetail: map[string]interface{}{\n\t\t\t\"detailKey\": detail,\n\t\t},\n\t\tDetailType: []*string{\n\t\t\tjsii.String(\"detailType\"),\n\t\t},\n\t\tId: []*string{\n\t\t\tjsii.String(\"id\"),\n\t\t},\n\t\tRegion: []*string{\n\t\t\tjsii.String(\"region\"),\n\t\t},\n\t\tResources: []*string{\n\t\t\tjsii.String(\"resources\"),\n\t\t},\n\t\tSource: []*string{\n\t\t\tjsii.String(\"source\"),\n\t\t},\n\t\tTime: []*string{\n\t\t\tjsii.String(\"time\"),\n\t\t},\n\t\tVersion: []*string{\n\t\t\tjsii.String(\"version\"),\n\t\t},\n\t},\n\tSourceEventBus: eventBus,\n\n\t// the properties below are optional\n\tArchiveName: jsii.String(\"archiveName\"),\n\tDescription: jsii.String(\"description\"),\n\tRetention: cdk.Duration_Minutes(jsii.Number(30)),\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 events from '@aws-cdk/aws-events';\nimport * as cdk from '@aws-cdk/core';\n\ndeclare const detail: any;\ndeclare const eventBus: events.EventBus;\nconst archive = new events.Archive(this, 'MyArchive', {\n eventPattern: {\n account: ['account'],\n detail: {\n detailKey: detail,\n },\n detailType: ['detailType'],\n id: ['id'],\n region: ['region'],\n resources: ['resources'],\n source: ['source'],\n time: ['time'],\n version: ['version'],\n },\n sourceEventBus: eventBus,\n\n // the properties below are optional\n archiveName: 'archiveName',\n description: 'description',\n retention: cdk.Duration.minutes(30),\n});","version":"0"}},"location":{"api":{"api":"type","fqn":"@aws-cdk/aws-events.Archive"},"field":{"field":"example"}},"didCompile":true,"fqnsReferenced":["@aws-cdk/aws-events.Archive","@aws-cdk/aws-events.ArchiveProps","@aws-cdk/aws-events.EventPattern","@aws-cdk/aws-events.IEventBus","@aws-cdk/core.Duration","@aws-cdk/core.Duration#minutes","constructs.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 events from '@aws-cdk/aws-events';\nimport * as cdk from '@aws-cdk/core';\n\ndeclare const detail: any;\ndeclare const eventBus: events.EventBus;\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 archive = new events.Archive(this, 'MyArchive', {\n eventPattern: {\n account: ['account'],\n detail: {\n detailKey: detail,\n },\n detailType: ['detailType'],\n id: ['id'],\n region: ['region'],\n resources: ['