@aws-cdk/aws-logs
Version:
The CDK Construct Library for AWS::Logs
765 lines • 248 kB
JSON
{
"version": "2",
"toolVersion": "1.74.0",
"snippets": {
"b93dcd77e3f4a567a4aacac01b43f145bbdd5efb5e751a87133c8e8293b715b8": {
"translations": {
"python": {
"source": "# Configure log group for short retention\nlog_group = LogGroup(stack, \"LogGroup\",\n retention=RetentionDays.ONE_WEEK\n)# Configure log group for infinite retention\nlog_group = LogGroup(stack, \"LogGroup\",\n retention=Infinity\n)",
"version": "2"
},
"csharp": {
"source": "// Configure log group for short retention\nLogGroup logGroup = new LogGroup(stack, \"LogGroup\", new LogGroupProps {\n Retention = RetentionDays.ONE_WEEK\n});// Configure log group for infinite retention\nLogGroup logGroup = new LogGroup(stack, \"LogGroup\", new LogGroupProps {\n Retention = Infinity\n});",
"version": "1"
},
"java": {
"source": "// Configure log group for short retention\nLogGroup logGroup = LogGroup.Builder.create(stack, \"LogGroup\")\n .retention(RetentionDays.ONE_WEEK)\n .build();// Configure log group for infinite retention\nLogGroup logGroup = LogGroup.Builder.create(stack, \"LogGroup\")\n .retention(Infinity)\n .build();",
"version": "1"
},
"go": {
"source": "// Configure log group for short retention\nlogGroup := lib.NewLogGroup(stack, jsii.String(\"LogGroup\"), &logGroupProps{\n\tretention: *lib.RetentionDays_ONE_WEEK,\n})// Configure log group for infinite retention\nlogGroup := lib.NewLogGroup(stack, jsii.String(\"LogGroup\"), &logGroupProps{\n\tretention: infinity,\n})",
"version": "1"
},
"$": {
"source": "// Configure log group for short retention\nconst logGroup = new LogGroup(stack, 'LogGroup', {\n retention: RetentionDays.ONE_WEEK,\n});\n// Configure log group for infinite retention\nconst logGroup = new LogGroup(stack, 'LogGroup', {\n retention: Infinity,\n});",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 35
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-logs.LogGroup",
"@aws-cdk/aws-logs.LogGroupProps",
"@aws-cdk/aws-logs.RetentionDays",
"@aws-cdk/aws-logs.RetentionDays#ONE_WEEK",
"constructs.Construct"
],
"fullSource": "import { Stack } from '@aws-cdk/core';\nimport { LogGroup, RetentionDays } from '../lib';\n\nconst stack = new Stack();\n\nfunction shortLogGroup() {\n /// !show\n // Configure log group for short retention\n const logGroup = new LogGroup(stack, 'LogGroup', {\n retention: RetentionDays.ONE_WEEK,\n });\n /// !hide\n return logGroup;\n}\n\nfunction infiniteLogGroup() {\n /// !show\n // Configure log group for infinite retention\n const logGroup = new LogGroup(stack, 'LogGroup', {\n retention: Infinity,\n });\n /// !hide\n return logGroup;\n}\n\n//\n\nArray.isArray(shortLogGroup);\nArray.isArray(infiniteLogGroup);\n",
"syntaxKindCounter": {
"10": 2,
"75": 11,
"193": 2,
"194": 1,
"197": 2,
"225": 2,
"242": 2,
"243": 2,
"281": 2
},
"fqnsFingerprint": "9317f82b3764813bd2755775b28e33e4c0b660d095ddc60f58de06beaf3005bd"
},
"985b5df53091f5f49370710f19c29eb310deb4093e54070a97f1e242623ad2ee": {
"translations": {
"python": {
"source": "log_group = logs.LogGroup(self, \"LogGroup\")\nlog_group.add_to_resource_policy(iam.PolicyStatement(\n actions=[\"logs:CreateLogStream\", \"logs:PutLogEvents\"],\n principals=[iam.ServicePrincipal(\"es.amazonaws.com\")],\n resources=[log_group.log_group_arn]\n))",
"version": "2"
},
"csharp": {
"source": "LogGroup logGroup = new LogGroup(this, \"LogGroup\");\nlogGroup.AddToResourcePolicy(new PolicyStatement(new PolicyStatementProps {\n Actions = new [] { \"logs:CreateLogStream\", \"logs:PutLogEvents\" },\n Principals = new [] { new ServicePrincipal(\"es.amazonaws.com\") },\n Resources = new [] { logGroup.LogGroupArn }\n}));",
"version": "1"
},
"java": {
"source": "LogGroup logGroup = new LogGroup(this, \"LogGroup\");\nlogGroup.addToResourcePolicy(PolicyStatement.Builder.create()\n .actions(List.of(\"logs:CreateLogStream\", \"logs:PutLogEvents\"))\n .principals(List.of(new ServicePrincipal(\"es.amazonaws.com\")))\n .resources(List.of(logGroup.getLogGroupArn()))\n .build());",
"version": "1"
},
"go": {
"source": "logGroup := logs.NewLogGroup(this, jsii.String(\"LogGroup\"))\nlogGroup.addToResourcePolicy(iam.NewPolicyStatement(&policyStatementProps{\n\tactions: []*string{\n\t\tjsii.String(\"logs:CreateLogStream\"),\n\t\tjsii.String(\"logs:PutLogEvents\"),\n\t},\n\tprincipals: []iPrincipal{\n\t\tiam.NewServicePrincipal(jsii.String(\"es.amazonaws.com\")),\n\t},\n\tresources: []*string{\n\t\tlogGroup.logGroupArn,\n\t},\n}))",
"version": "1"
},
"$": {
"source": "const logGroup = new logs.LogGroup(this, 'LogGroup');\nlogGroup.addToResourcePolicy(new iam.PolicyStatement({\n actions: ['logs:CreateLogStream', 'logs:PutLogEvents'],\n principals: [new iam.ServicePrincipal('es.amazonaws.com')],\n resources: [logGroup.logGroupArn],\n}));",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 65
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-iam.PolicyStatement",
"@aws-cdk/aws-iam.PolicyStatementProps",
"@aws-cdk/aws-iam.ServicePrincipal",
"@aws-cdk/aws-logs.LogGroup",
"@aws-cdk/aws-logs.LogGroup#logGroupArn",
"constructs.Construct"
],
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from '@aws-cdk/core';\nimport * as logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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 logGroup = new logs.LogGroup(this, 'LogGroup');\nlogGroup.addToResourcePolicy(new iam.PolicyStatement({\n actions: ['logs:CreateLogStream', 'logs:PutLogEvents'],\n principals: [new iam.ServicePrincipal('es.amazonaws.com')],\n resources: [logGroup.logGroupArn],\n}));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"10": 4,
"75": 14,
"104": 1,
"192": 3,
"193": 1,
"194": 5,
"196": 1,
"197": 3,
"225": 1,
"226": 1,
"242": 1,
"243": 1,
"281": 3
},
"fqnsFingerprint": "3308da1affe035270c3ed7b6448fd091ef4a0678032c766b9eaf3a471cecbe0a"
},
"3a8fcdb50dbc930d42a30acced3c4886f44813645c1eeaaa3ac4ad6674a201bf": {
"translations": {
"python": {
"source": "log_group = logs.LogGroup(self, \"LogGroup\")\nlog_group.grant_write(iam.ServicePrincipal(\"es.amazonaws.com\"))",
"version": "2"
},
"csharp": {
"source": "LogGroup logGroup = new LogGroup(this, \"LogGroup\");\nlogGroup.GrantWrite(new ServicePrincipal(\"es.amazonaws.com\"));",
"version": "1"
},
"java": {
"source": "LogGroup logGroup = new LogGroup(this, \"LogGroup\");\nlogGroup.grantWrite(new ServicePrincipal(\"es.amazonaws.com\"));",
"version": "1"
},
"go": {
"source": "logGroup := logs.NewLogGroup(this, jsii.String(\"LogGroup\"))\nlogGroup.grantWrite(iam.NewServicePrincipal(jsii.String(\"es.amazonaws.com\")))",
"version": "1"
},
"$": {
"source": "const logGroup = new logs.LogGroup(this, 'LogGroup');\nlogGroup.grantWrite(new iam.ServicePrincipal('es.amazonaws.com'));",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 76
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-iam.IGrantable",
"@aws-cdk/aws-iam.ServicePrincipal",
"@aws-cdk/aws-logs.LogGroup",
"constructs.Construct"
],
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from '@aws-cdk/core';\nimport * as logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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 logGroup = new logs.LogGroup(this, 'LogGroup');\nlogGroup.grantWrite(new iam.ServicePrincipal('es.amazonaws.com'));\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"10": 2,
"75": 7,
"104": 1,
"194": 3,
"196": 1,
"197": 2,
"225": 1,
"226": 1,
"242": 1,
"243": 1
},
"fqnsFingerprint": "48e7f4e9810861fa2a1a9f8b3d9398ffb212ce4ef066c971a87a54ad573df845"
},
"9c70243a96fbdfb055298a91d88726d122e04fb5da04e12e8b74d35bf4d683e6": {
"translations": {
"python": {
"source": "import aws_cdk.aws_kms as kms\n\n\nlogs.LogGroup(self, \"LogGroup\",\n encryption_key=kms.Key(self, \"Key\")\n)",
"version": "2"
},
"csharp": {
"source": "using Amazon.CDK.AWS.KMS;\n\n\nnew LogGroup(this, \"LogGroup\", new LogGroupProps {\n EncryptionKey = new Key(this, \"Key\")\n});",
"version": "1"
},
"java": {
"source": "import software.amazon.awscdk.services.kms.*;\n\n\nLogGroup.Builder.create(this, \"LogGroup\")\n .encryptionKey(new Key(this, \"Key\"))\n .build();",
"version": "1"
},
"go": {
"source": "import kms \"github.com/aws-samples/dummy/awscdkawskms\"\n\n\nlogs.NewLogGroup(this, jsii.String(\"LogGroup\"), &logGroupProps{\n\tencryptionKey: kms.NewKey(this, jsii.String(\"Key\")),\n})",
"version": "1"
},
"$": {
"source": "import * as kms from '@aws-cdk/aws-kms';\n\nnew logs.LogGroup(this, 'LogGroup', {\n encryptionKey: new kms.Key(this, 'Key'),\n});",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 95
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-kms.IKey",
"@aws-cdk/aws-kms.Key",
"@aws-cdk/aws-logs.LogGroup",
"@aws-cdk/aws-logs.LogGroupProps",
"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 { Stack } from '@aws-cdk/core';\nimport * as logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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\nnew logs.LogGroup(this, 'LogGroup', {\n encryptionKey: new kms.Key(this, 'Key'),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"10": 3,
"75": 6,
"104": 2,
"193": 1,
"194": 2,
"197": 2,
"226": 1,
"254": 1,
"255": 1,
"256": 1,
"281": 1,
"290": 1
},
"fqnsFingerprint": "db1a8c1343118255c87c43d79b62950a6de077325d5638b130c60ec06da62adf"
},
"cb2571c517166398accdd86db72c8d603ddfb40d3a126c7614414fbf43206a77": {
"translations": {
"python": {
"source": "import aws_cdk.aws_logs_destinations as destinations\n# fn: lambda.Function\n# log_group: logs.LogGroup\n\n\nlogs.SubscriptionFilter(self, \"Subscription\",\n log_group=log_group,\n destination=destinations.LambdaDestination(fn),\n filter_pattern=logs.FilterPattern.all_terms(\"ERROR\", \"MainThread\")\n)",
"version": "2"
},
"csharp": {
"source": "using Amazon.CDK.AWS.Logs.Destinations;\nFunction fn;\nLogGroup logGroup;\n\n\nnew SubscriptionFilter(this, \"Subscription\", new SubscriptionFilterProps {\n LogGroup = logGroup,\n Destination = new LambdaDestination(fn),\n FilterPattern = FilterPattern.AllTerms(\"ERROR\", \"MainThread\")\n});",
"version": "1"
},
"java": {
"source": "import software.amazon.awscdk.services.logs.destinations.*;\nFunction fn;\nLogGroup logGroup;\n\n\nSubscriptionFilter.Builder.create(this, \"Subscription\")\n .logGroup(logGroup)\n .destination(new LambdaDestination(fn))\n .filterPattern(FilterPattern.allTerms(\"ERROR\", \"MainThread\"))\n .build();",
"version": "1"
},
"go": {
"source": "import destinations \"github.com/aws-samples/dummy/awscdkawslogsdestinations\"\nvar fn function\nvar logGroup logGroup\n\n\nlogs.NewSubscriptionFilter(this, jsii.String(\"Subscription\"), &subscriptionFilterProps{\n\tlogGroup: logGroup,\n\tdestination: destinations.NewLambdaDestination(fn),\n\tfilterPattern: logs.filterPattern.allTerms(jsii.String(\"ERROR\"), jsii.String(\"MainThread\")),\n})",
"version": "1"
},
"$": {
"source": "import * as destinations from '@aws-cdk/aws-logs-destinations';\ndeclare const fn: lambda.Function;\ndeclare const logGroup: logs.LogGroup;\n\nnew logs.SubscriptionFilter(this, 'Subscription', {\n logGroup,\n destination: new destinations.LambdaDestination(fn),\n filterPattern: logs.FilterPattern.allTerms(\"ERROR\", \"MainThread\"),\n});",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 119
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-lambda.IFunction",
"@aws-cdk/aws-logs-destinations.LambdaDestination",
"@aws-cdk/aws-logs.FilterPattern",
"@aws-cdk/aws-logs.FilterPattern#allTerms",
"@aws-cdk/aws-logs.IFilterPattern",
"@aws-cdk/aws-logs.ILogGroup",
"@aws-cdk/aws-logs.ILogSubscriptionDestination",
"@aws-cdk/aws-logs.SubscriptionFilter",
"@aws-cdk/aws-logs.SubscriptionFilterProps",
"constructs.Construct"
],
"fullSource": "// Hoisted imports begin after !show marker below\n/// !show\nimport * as destinations from '@aws-cdk/aws-logs-destinations';\ndeclare const fn: lambda.Function;\ndeclare const logGroup: logs.LogGroup;\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 logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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\nnew logs.SubscriptionFilter(this, 'Subscription', {\n logGroup,\n destination: new destinations.LambdaDestination(fn),\n filterPattern: logs.FilterPattern.allTerms(\"ERROR\", \"MainThread\"),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"10": 4,
"75": 18,
"104": 1,
"130": 2,
"153": 2,
"169": 2,
"193": 1,
"194": 4,
"196": 1,
"197": 2,
"225": 2,
"226": 1,
"242": 2,
"243": 2,
"254": 1,
"255": 1,
"256": 1,
"281": 2,
"282": 1,
"290": 1
},
"fqnsFingerprint": "c4976cece6cd33aa4c017d9630d31206fe2b4af8c139af7663f6f9b4d5f47ddb"
},
"3e4f9df91c64586fbd3c7276422a7f18175545ca8825131b1a272f7de1dd4abd": {
"translations": {
"python": {
"source": "MetricFilter(self, \"MetricFilter\",\n log_group=log_group,\n metric_namespace=\"MyApp\",\n metric_name=\"Latency\",\n filter_pattern=FilterPattern.exists(\"$.latency\"),\n metric_value=\"$.latency\"\n)",
"version": "2"
},
"csharp": {
"source": "new MetricFilter(this, \"MetricFilter\", new MetricFilterProps {\n LogGroup = logGroup,\n MetricNamespace = \"MyApp\",\n MetricName = \"Latency\",\n FilterPattern = FilterPattern.Exists(\"$.latency\"),\n MetricValue = \"$.latency\"\n});",
"version": "1"
},
"java": {
"source": "MetricFilter.Builder.create(this, \"MetricFilter\")\n .logGroup(logGroup)\n .metricNamespace(\"MyApp\")\n .metricName(\"Latency\")\n .filterPattern(FilterPattern.exists(\"$.latency\"))\n .metricValue(\"$.latency\")\n .build();",
"version": "1"
},
"go": {
"source": "lib.NewMetricFilter(this, jsii.String(\"MetricFilter\"), &metricFilterProps{\n\tlogGroup: logGroup,\n\tmetricNamespace: jsii.String(\"MyApp\"),\n\tmetricName: jsii.String(\"Latency\"),\n\tfilterPattern: *lib.FilterPattern.exists(jsii.String(\"$.latency\")),\n\tmetricValue: jsii.String(\"$.latency\"),\n})",
"version": "1"
},
"$": {
"source": "new MetricFilter(this, 'MetricFilter', {\n logGroup,\n metricNamespace: 'MyApp',\n metricName: 'Latency',\n filterPattern: FilterPattern.exists('$.latency'),\n metricValue: '$.latency',\n});",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 143
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-logs.FilterPattern#exists",
"@aws-cdk/aws-logs.IFilterPattern",
"@aws-cdk/aws-logs.ILogGroup",
"@aws-cdk/aws-logs.MetricFilter",
"@aws-cdk/aws-logs.MetricFilterProps",
"@aws-cdk/core.RemovalPolicy",
"constructs.Construct"
],
"fullSource": "import { App, RemovalPolicy, Stack, StackProps } from '@aws-cdk/core';\nimport { FilterPattern, LogGroup, MetricFilter } from '../lib';\n\nclass MetricFilterIntegStack extends Stack {\n constructor(scope: App, id: string, props?: StackProps) {\n super(scope, id, props);\n\n const logGroup = new LogGroup(this, 'LogGroup', {\n removalPolicy: RemovalPolicy.DESTROY,\n });\n\n /// !show\n new MetricFilter(this, 'MetricFilter', {\n logGroup,\n metricNamespace: 'MyApp',\n metricName: 'Latency',\n filterPattern: FilterPattern.exists('$.latency'),\n metricValue: '$.latency',\n });\n /// !hide\n }\n}\n\nconst app = new App();\nnew MetricFilterIntegStack(app, 'aws-cdk-metricfilter-integ');\napp.synth();\n",
"syntaxKindCounter": {
"10": 5,
"75": 8,
"104": 1,
"193": 1,
"194": 1,
"196": 1,
"197": 1,
"226": 1,
"281": 4,
"282": 1
},
"fqnsFingerprint": "807e3d39d26baa68827a53009916a79dec3f6b9f4702e11808620a18b25dfd53"
},
"1055fce4065d6d23483cf42bc5062f7f6ec193d23f877f2a10dfede07e71b759": {
"translations": {
"python": {
"source": "# log_group: logs.LogGroup\n\nlog_group.extract_metric(\"$.jsonField\", \"Namespace\", \"MetricName\")",
"version": "2"
},
"csharp": {
"source": "LogGroup logGroup;\n\nlogGroup.ExtractMetric(\"$.jsonField\", \"Namespace\", \"MetricName\");",
"version": "1"
},
"java": {
"source": "LogGroup logGroup;\n\nlogGroup.extractMetric(\"$.jsonField\", \"Namespace\", \"MetricName\");",
"version": "1"
},
"go": {
"source": "var logGroup logGroup\n\nlogGroup.extractMetric(jsii.String(\"$.jsonField\"), jsii.String(\"Namespace\"), jsii.String(\"MetricName\"))",
"version": "1"
},
"$": {
"source": "declare const logGroup: logs.LogGroup;\nlogGroup.extractMetric('$.jsonField', 'Namespace', 'MetricName');",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 159
}
},
"didCompile": true,
"fqnsReferenced": [],
"fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const logGroup: logs.LogGroup;\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 logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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\nlogGroup.extractMetric('$.jsonField', 'Namespace', 'MetricName');\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"10": 3,
"75": 5,
"130": 1,
"153": 1,
"169": 1,
"194": 1,
"196": 1,
"225": 1,
"226": 1,
"242": 1,
"243": 1,
"290": 1
},
"fqnsFingerprint": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
},
"286b56ff6fb84fcebe253f25a5a40c01e231a07aa6faf248597c5ab7243f1f6a": {
"translations": {
"python": {
"source": "# log_group: logs.LogGroup\n\nmf = logs.MetricFilter(self, \"MetricFilter\",\n log_group=log_group,\n metric_namespace=\"MyApp\",\n metric_name=\"Latency\",\n filter_pattern=logs.FilterPattern.exists(\"$.latency\"),\n metric_value=\"$.latency\"\n)\n\n# expose a metric from the metric filter\nmetric = mf.metric()\n\n# you can use the metric to create a new alarm\ncloudwatch.Alarm(self, \"alarm from metric filter\",\n metric=metric,\n threshold=100,\n evaluation_periods=2\n)",
"version": "2"
},
"csharp": {
"source": "LogGroup logGroup;\n\nMetricFilter mf = new MetricFilter(this, \"MetricFilter\", new MetricFilterProps {\n LogGroup = logGroup,\n MetricNamespace = \"MyApp\",\n MetricName = \"Latency\",\n FilterPattern = FilterPattern.Exists(\"$.latency\"),\n MetricValue = \"$.latency\"\n});\n\n//expose a metric from the metric filter\nMetric metric = mf.Metric();\n\n//you can use the metric to create a new alarm\n//you can use the metric to create a new alarm\nnew Alarm(this, \"alarm from metric filter\", new AlarmProps {\n Metric = metric,\n Threshold = 100,\n EvaluationPeriods = 2\n});",
"version": "1"
},
"java": {
"source": "LogGroup logGroup;\n\nMetricFilter mf = MetricFilter.Builder.create(this, \"MetricFilter\")\n .logGroup(logGroup)\n .metricNamespace(\"MyApp\")\n .metricName(\"Latency\")\n .filterPattern(FilterPattern.exists(\"$.latency\"))\n .metricValue(\"$.latency\")\n .build();\n\n//expose a metric from the metric filter\nMetric metric = mf.metric();\n\n//you can use the metric to create a new alarm\n//you can use the metric to create a new alarm\nAlarm.Builder.create(this, \"alarm from metric filter\")\n .metric(metric)\n .threshold(100)\n .evaluationPeriods(2)\n .build();",
"version": "1"
},
"go": {
"source": "var logGroup logGroup\n\nmf := logs.NewMetricFilter(this, jsii.String(\"MetricFilter\"), &metricFilterProps{\n\tlogGroup: logGroup,\n\tmetricNamespace: jsii.String(\"MyApp\"),\n\tmetricName: jsii.String(\"Latency\"),\n\tfilterPattern: logs.filterPattern.exists(jsii.String(\"$.latency\")),\n\tmetricValue: jsii.String(\"$.latency\"),\n})\n\n//expose a metric from the metric filter\nmetric := mf.metric()\n\n//you can use the metric to create a new alarm\n//you can use the metric to create a new alarm\ncloudwatch.NewAlarm(this, jsii.String(\"alarm from metric filter\"), &alarmProps{\n\tmetric: metric,\n\tthreshold: jsii.Number(100),\n\tevaluationPeriods: jsii.Number(2),\n})",
"version": "1"
},
"$": {
"source": "declare const logGroup: logs.LogGroup;\nconst mf = new logs.MetricFilter(this, 'MetricFilter', {\n logGroup,\n metricNamespace: 'MyApp',\n metricName: 'Latency',\n filterPattern: logs.FilterPattern.exists('$.latency'),\n metricValue: '$.latency',\n});\n\n//expose a metric from the metric filter\nconst metric = mf.metric();\n\n//you can use the metric to create a new alarm\nnew cloudwatch.Alarm(this, 'alarm from metric filter', {\n metric,\n threshold: 100,\n evaluationPeriods: 2,\n});",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 173
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-cloudwatch.Alarm",
"@aws-cdk/aws-cloudwatch.AlarmProps",
"@aws-cdk/aws-cloudwatch.IMetric",
"@aws-cdk/aws-cloudwatch.Metric",
"@aws-cdk/aws-logs.FilterPattern",
"@aws-cdk/aws-logs.FilterPattern#exists",
"@aws-cdk/aws-logs.IFilterPattern",
"@aws-cdk/aws-logs.ILogGroup",
"@aws-cdk/aws-logs.MetricFilter",
"@aws-cdk/aws-logs.MetricFilter#metric",
"@aws-cdk/aws-logs.MetricFilterProps",
"constructs.Construct"
],
"fullSource": "// Hoisted imports begin after !show marker below\n/// !show\ndeclare const logGroup: logs.LogGroup;\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 logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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\nconst mf = new logs.MetricFilter(this, 'MetricFilter', {\n logGroup,\n metricNamespace: 'MyApp',\n metricName: 'Latency',\n filterPattern: logs.FilterPattern.exists('$.latency'),\n metricValue: '$.latency',\n});\n\n//expose a metric from the metric filter\nconst metric = mf.metric();\n\n//you can use the metric to create a new alarm\nnew cloudwatch.Alarm(this, 'alarm from metric filter', {\n metric,\n threshold: 100,\n evaluationPeriods: 2,\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"8": 2,
"10": 6,
"75": 22,
"104": 2,
"130": 1,
"153": 1,
"169": 1,
"193": 2,
"194": 5,
"196": 2,
"197": 2,
"225": 3,
"226": 1,
"242": 3,
"243": 3,
"281": 6,
"282": 2,
"290": 1
},
"fqnsFingerprint": "c805c89afc1528b053ce31578f556bff9dd03bddcca45e561d1d5326a11e286c"
},
"64e5b1c64c310e339119a8a76813d51249bad4471d11ec5074de3eb68096986b": {
"translations": {
"python": {
"source": "# Search for lines that contain both \"ERROR\" and \"MainThread\"\npattern1 = logs.FilterPattern.all_terms(\"ERROR\", \"MainThread\")\n\n# Search for lines that either contain both \"ERROR\" and \"MainThread\", or\n# both \"WARN\" and \"Deadlock\".\npattern2 = logs.FilterPattern.any_term_group([\"ERROR\", \"MainThread\"], [\"WARN\", \"Deadlock\"])",
"version": "2"
},
"csharp": {
"source": "// Search for lines that contain both \"ERROR\" and \"MainThread\"\nIFilterPattern pattern1 = FilterPattern.AllTerms(\"ERROR\", \"MainThread\");\n\n// Search for lines that either contain both \"ERROR\" and \"MainThread\", or\n// both \"WARN\" and \"Deadlock\".\nIFilterPattern pattern2 = FilterPattern.AnyTermGroup(new [] { \"ERROR\", \"MainThread\" }, new [] { \"WARN\", \"Deadlock\" });",
"version": "1"
},
"java": {
"source": "// Search for lines that contain both \"ERROR\" and \"MainThread\"\nIFilterPattern pattern1 = FilterPattern.allTerms(\"ERROR\", \"MainThread\");\n\n// Search for lines that either contain both \"ERROR\" and \"MainThread\", or\n// both \"WARN\" and \"Deadlock\".\nIFilterPattern pattern2 = FilterPattern.anyTermGroup(List.of(\"ERROR\", \"MainThread\"), List.of(\"WARN\", \"Deadlock\"));",
"version": "1"
},
"go": {
"source": "// Search for lines that contain both \"ERROR\" and \"MainThread\"\npattern1 := logs.filterPattern.allTerms(jsii.String(\"ERROR\"), jsii.String(\"MainThread\"))\n\n// Search for lines that either contain both \"ERROR\" and \"MainThread\", or\n// both \"WARN\" and \"Deadlock\".\npattern2 := logs.filterPattern.anyTermGroup([]*string{\n\tjsii.String(\"ERROR\"),\n\tjsii.String(\"MainThread\"),\n}, []*string{\n\tjsii.String(\"WARN\"),\n\tjsii.String(\"Deadlock\"),\n})",
"version": "1"
},
"$": {
"source": "// Search for lines that contain both \"ERROR\" and \"MainThread\"\nconst pattern1 = logs.FilterPattern.allTerms('ERROR', 'MainThread');\n\n// Search for lines that either contain both \"ERROR\" and \"MainThread\", or\n// both \"WARN\" and \"Deadlock\".\nconst pattern2 = logs.FilterPattern.anyTermGroup(\n ['ERROR', 'MainThread'],\n ['WARN', 'Deadlock'],\n);",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 229
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-logs.FilterPattern",
"@aws-cdk/aws-logs.FilterPattern#allTerms",
"@aws-cdk/aws-logs.FilterPattern#anyTermGroup",
"@aws-cdk/aws-logs.IFilterPattern"
],
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from '@aws-cdk/core';\nimport * as logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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// Search for lines that contain both \"ERROR\" and \"MainThread\"\nconst pattern1 = logs.FilterPattern.allTerms('ERROR', 'MainThread');\n\n// Search for lines that either contain both \"ERROR\" and \"MainThread\", or\n// both \"WARN\" and \"Deadlock\".\nconst pattern2 = logs.FilterPattern.anyTermGroup(\n ['ERROR', 'MainThread'],\n ['WARN', 'Deadlock'],\n);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"10": 6,
"75": 8,
"192": 2,
"194": 4,
"196": 2,
"225": 2,
"242": 2,
"243": 2
},
"fqnsFingerprint": "5ddcc4251313dda0663580d6112e97f9bddb899c9a72ed783f1c1793d4cb1345"
},
"5addc27a506797aac2c8825b92273f2c3a8c4e6a249763f9550a313229f0f2b5": {
"translations": {
"python": {
"source": "# Search for all events where the component field is equal to\n# \"HttpServer\" and either error is true or the latency is higher\n# than 1000.\npattern = logs.FilterPattern.all(\n logs.FilterPattern.string_value(\"$.component\", \"=\", \"HttpServer\"),\n logs.FilterPattern.any(\n logs.FilterPattern.boolean_value(\"$.error\", True),\n logs.FilterPattern.number_value(\"$.latency\", \">\", 1000)))",
"version": "2"
},
"csharp": {
"source": "// Search for all events where the component field is equal to\n// \"HttpServer\" and either error is true or the latency is higher\n// than 1000.\nJsonPattern pattern = FilterPattern.All(FilterPattern.StringValue(\"$.component\", \"=\", \"HttpServer\"), FilterPattern.Any(FilterPattern.BooleanValue(\"$.error\", true), FilterPattern.NumberValue(\"$.latency\", \">\", 1000)));",
"version": "1"
},
"java": {
"source": "// Search for all events where the component field is equal to\n// \"HttpServer\" and either error is true or the latency is higher\n// than 1000.\nJsonPattern pattern = FilterPattern.all(FilterPattern.stringValue(\"$.component\", \"=\", \"HttpServer\"), FilterPattern.any(FilterPattern.booleanValue(\"$.error\", true), FilterPattern.numberValue(\"$.latency\", \">\", 1000)));",
"version": "1"
},
"go": {
"source": "// Search for all events where the component field is equal to\n// \"HttpServer\" and either error is true or the latency is higher\n// than 1000.\npattern := logs.filterPattern.all(logs.filterPattern.stringValue(jsii.String(\"$.component\"), jsii.String(\"=\"), jsii.String(\"HttpServer\")), logs.filterPattern.any(logs.filterPattern.booleanValue(jsii.String(\"$.error\"), jsii.Boolean(true)), logs.filterPattern.numberValue(jsii.String(\"$.latency\"), jsii.String(\">\"), jsii.Number(1000))))",
"version": "1"
},
"$": {
"source": "// Search for all events where the component field is equal to\n// \"HttpServer\" and either error is true or the latency is higher\n// than 1000.\nconst pattern = logs.FilterPattern.all(\n logs.FilterPattern.stringValue('$.component', '=', 'HttpServer'),\n logs.FilterPattern.any(\n logs.FilterPattern.booleanValue('$.error', true),\n logs.FilterPattern.numberValue('$.latency', '>', 1000),\n ),\n);",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 277
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-logs.FilterPattern",
"@aws-cdk/aws-logs.FilterPattern#all",
"@aws-cdk/aws-logs.FilterPattern#any",
"@aws-cdk/aws-logs.FilterPattern#booleanValue",
"@aws-cdk/aws-logs.FilterPattern#numberValue",
"@aws-cdk/aws-logs.FilterPattern#stringValue",
"@aws-cdk/aws-logs.JsonPattern"
],
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from '@aws-cdk/core';\nimport * as logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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// Search for all events where the component field is equal to\n// \"HttpServer\" and either error is true or the latency is higher\n// than 1000.\nconst pattern = logs.FilterPattern.all(\n logs.FilterPattern.stringValue('$.component', '=', 'HttpServer'),\n logs.FilterPattern.any(\n logs.FilterPattern.booleanValue('$.error', true),\n logs.FilterPattern.numberValue('$.latency', '>', 1000),\n ),\n);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"8": 1,
"10": 6,
"75": 16,
"106": 1,
"194": 10,
"196": 5,
"225": 1,
"242": 1,
"243": 1
},
"fqnsFingerprint": "376fef3a73421cf7caf246b30cb963333eece753706ca50895d7c6c968c15d82"
},
"1f4ef47e33b7a9dce036335150bdbab991d9e3002577933b44ebe9bc66776980": {
"translations": {
"python": {
"source": "# Search for all events where the component is \"HttpServer\" and the\n# result code is not equal to 200.\npattern = logs.FilterPattern.space_delimited(\"time\", \"component\", \"...\", \"result_code\", \"latency\").where_string(\"component\", \"=\", \"HttpServer\").where_number(\"result_code\", \"!=\", 200)",
"version": "2"
},
"csharp": {
"source": "// Search for all events where the component is \"HttpServer\" and the\n// result code is not equal to 200.\nSpaceDelimitedTextPattern pattern = FilterPattern.SpaceDelimited(\"time\", \"component\", \"...\", \"result_code\", \"latency\").WhereString(\"component\", \"=\", \"HttpServer\").WhereNumber(\"result_code\", \"!=\", 200);",
"version": "1"
},
"java": {
"source": "// Search for all events where the component is \"HttpServer\" and the\n// result code is not equal to 200.\nSpaceDelimitedTextPattern pattern = FilterPattern.spaceDelimited(\"time\", \"component\", \"...\", \"result_code\", \"latency\").whereString(\"component\", \"=\", \"HttpServer\").whereNumber(\"result_code\", \"!=\", 200);",
"version": "1"
},
"go": {
"source": "// Search for all events where the component is \"HttpServer\" and the\n// result code is not equal to 200.\npattern := logs.filterPattern.spaceDelimited(jsii.String(\"time\"), jsii.String(\"component\"), jsii.String(\"...\"), jsii.String(\"result_code\"), jsii.String(\"latency\")).whereString(jsii.String(\"component\"), jsii.String(\"=\"), jsii.String(\"HttpServer\")).whereNumber(jsii.String(\"result_code\"), jsii.String(\"!=\"), jsii.Number(200))",
"version": "1"
},
"$": {
"source": "// Search for all events where the component is \"HttpServer\" and the\n// result code is not equal to 200.\nconst pattern = logs.FilterPattern.spaceDelimited('time', 'component', '...', 'result_code', 'latency')\n .whereString('component', '=', 'HttpServer')\n .whereNumber('result_code', '!=', 200);",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 318
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-logs.FilterPattern",
"@aws-cdk/aws-logs.FilterPattern#spaceDelimited",
"@aws-cdk/aws-logs.SpaceDelimitedTextPattern",
"@aws-cdk/aws-logs.SpaceDelimitedTextPattern#whereNumber",
"@aws-cdk/aws-logs.SpaceDelimitedTextPattern#whereString"
],
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from '@aws-cdk/core';\nimport * as logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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// Search for all events where the component is \"HttpServer\" and the\n// result code is not equal to 200.\nconst pattern = logs.FilterPattern.spaceDelimited('time', 'component', '...', 'result_code', 'latency')\n .whereString('component', '=', 'HttpServer')\n .whereNumber('result_code', '!=', 200);\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"8": 1,
"10": 10,
"75": 6,
"194": 4,
"196": 3,
"225": 1,
"242": 1,
"243": 1
},
"fqnsFingerprint": "21704a18ecdb7086d532c7467ee18fdfac540eb28f25941afb0687fc7d123836"
},
"ecef777a1e830ec741ffce6a33b9e4d4efde7978c586e58bf7f3b34e1ae837db": {
"translations": {
"python": {
"source": "logs.QueryDefinition(self, \"QueryDefinition\",\n query_definition_name=\"MyQuery\",\n query_string=logs.QueryString(\n fields=[\"@timestamp\", \"@message\"],\n sort=\"@timestamp desc\",\n limit=20\n )\n)",
"version": "2"
},
"csharp": {
"source": "new QueryDefinition(this, \"QueryDefinition\", new QueryDefinitionProps {\n QueryDefinitionName = \"MyQuery\",\n QueryString = new QueryString(new QueryStringProps {\n Fields = new [] { \"@timestamp\", \"@message\" },\n Sort = \"@timestamp desc\",\n Limit = 20\n })\n});",
"version": "1"
},
"java": {
"source": "QueryDefinition.Builder.create(this, \"QueryDefinition\")\n .queryDefinitionName(\"MyQuery\")\n .queryString(QueryString.Builder.create()\n .fields(List.of(\"@timestamp\", \"@message\"))\n .sort(\"@timestamp desc\")\n .limit(20)\n .build())\n .build();",
"version": "1"
},
"go": {
"source": "logs.NewQueryDefinition(this, jsii.String(\"QueryDefinition\"), &queryDefinitionProps{\n\tqueryDefinitionName: jsii.String(\"MyQuery\"),\n\tqueryString: logs.NewQueryString(&queryStringProps{\n\t\tfields: []*string{\n\t\t\tjsii.String(\"@timestamp\"),\n\t\t\tjsii.String(\"@message\"),\n\t\t},\n\t\tsort: jsii.String(\"@timestamp desc\"),\n\t\tlimit: jsii.Number(20),\n\t}),\n})",
"version": "1"
},
"$": {
"source": "new logs.QueryDefinition(this, 'QueryDefinition', {\n queryDefinitionName: 'MyQuery',\n queryString: new logs.QueryString({\n fields: ['@timestamp', '@message'],\n sort: '@timestamp desc',\n limit: 20,\n }),\n});",
"version": "0"
}
},
"location": {
"api": {
"api": "moduleReadme",
"moduleFqn": "@aws-cdk/aws-logs"
},
"field": {
"field": "markdown",
"line": 332
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-logs.QueryDefinition",
"@aws-cdk/aws-logs.QueryDefinitionProps",
"@aws-cdk/aws-logs.QueryString",
"@aws-cdk/aws-logs.QueryStringProps",
"constructs.Construct"
],
"fullSource": "// Fixture with packages imported, but nothing else\nimport { Construct } from 'constructs';\nimport { Stack } from '@aws-cdk/core';\nimport * as logs from '@aws-cdk/aws-logs';\nimport * as iam from '@aws-cdk/aws-iam';\nimport * as cloudwatch from '@aws-cdk/aws-cloudwatch';\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\nnew logs.QueryDefinition(this, 'QueryDefinition', {\n queryDefinitionName: 'MyQuery',\n queryString: new logs.QueryString({\n fields: ['@timestamp', '@message'],\n sort: '@timestamp desc',\n limit: 20,\n }),\n});\n/// !hide\n// Code snippet ended before !hide marker above\n }\n}\n\n",
"syntaxKindCounter": {
"8": 1,
"10": 5,
"75": 9,
"104": 1,
"192": 1,
"193": 2,
"194": 2,
"197": 2,
"226": 1,
"281": 5
},
"fqnsFingerprint": "2c1b03f5f85c5b5c727b8181577e1b6a7ab45b415fa54ee095df217b061916c6"
},
"11c811ece799c9992e86a9bc11df5c857b8c54bf8dfb303f71f43232d3d60a3c": {
"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_logs as logs\n\ncfn_destination = logs.CfnDestination(self, \"MyCfnDestination\",\n destination_name=\"destinationName\",\n role_arn=\"roleArn\",\n target_arn=\"targetArn\",\n\n # the properties below are optional\n destination_policy=\"destinationPolicy\"\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.Logs;\n\nCfnDestination cfnDestination = new CfnDestination(this, \"MyCfnDestination\", new CfnDestinationProps {\n DestinationName = \"destinationName\",\n RoleArn = \"roleArn\",\n TargetArn = \"targetArn\",\n\n // the properties below are optional\n DestinationPolicy = \"destinationPolicy\"\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.logs.*;\n\nCfnDestination cfnDestination = CfnDestination.Builder.create(this, \"MyCfnDestination\")\n .destinationName(\"destinationName\")\n .roleArn(\"roleArn\")\n .targetArn(\"targetArn\")\n\n // the properties below are optional\n .destinationPolicy(\"destinationPolicy\")\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 logs \"github.com/aws-samples/dummy/awscdkawslogs\"\n\ncfnDestination := logs.NewCfnDestination(this, jsii.String(\"MyCfnDestination\"), &cfnDestinationProps{\n\tdestinationName: jsii.String(\"destinationName\"),\n\troleArn: jsii.String(\"roleArn\"),\n\ttargetArn: jsii.String(\"targetArn\"),\n\n\t// the properties below are optional\n\tdestinationPolicy: jsii.String(\"destinationPolicy\"),\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 logs from '@aws-cdk/aws-logs';\nconst cfnDestination = new logs.CfnDestination(this, 'MyCfnDestination', {\n destinationName: 'destinationName',\n roleArn: 'roleArn',\n targetArn: 'targetArn',\n\n // the properties below are optional\n destinationPolicy: 'destinationPolicy',\n});",
"version": "0"
}
},
"location": {
"api": {
"api": "type",
"fqn": "@aws-cdk/aws-logs.CfnDestination"
},
"field": {
"field": "example"
}
},
"didCompile": true,
"fqnsReferenced": [
"@aws-cdk/aws-logs.CfnDestination",
"@aws-cdk/aws-logs.CfnDestinationProps",
"@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 logs from '@aws-cdk/aws-logs';\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 cfnDestination = new logs.CfnDestination(this, 'MyCfnDestination', {\n destinationName: 'destinationName',\n roleArn: 'roleArn',\n targetArn: 'targetArn',\n\n // the properties below are optional\n destinationPolicy: 'destinationPolicy',\n});\n/// !hide\n// Code snippet ended before !hide marker above\n} }",
"syntaxKindCounter": {
"10": 6,
"75": 8,
"104": 1,
"193": 1,
"194": 1,
"197": 1,
"225": 1,
"242": 1,
"243": 1,
"254": 1,
"255": 1,
"256": 1,
"281": 4,
"290": 1
},
"fqnsFingerprint": "b83f98dea5b44ad81e1fa79f5b7e8a82007c6db6750076da6b5da25eee5b2de1"
},
"d124bed7f6a93ffe2ceb3c54f1d9860525a0c6b04f4a5d8ef98b144ddede6686": {
"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_logs as logs\n\ncfn_destination_props = logs.CfnDestinationProps(\n destination_name=\"destinationName\",\n role_arn=\"roleArn\",\n target_arn=\"targetArn