pulumi/pkg/operations/testdata/todo.json

1173 lines
95 KiB
JSON

{
"target": "foo",
"latest": {
"time": "2017-11-08T11:59:08.512209-08:00",
"resources": [
{
"urn": "urn:pulumi:foo::todo::aws:dynamodb/table:Table::todo",
"custom": true,
"id": "todo-a1916a6b16ec016b",
"type": "aws:dynamodb/table:Table",
"parent": "urn:pulumi:foo::todo::cloud:table:Table::todo",
"inputs": {
"attribute": [
{
"name": "id",
"type": "S"
}
],
"hashKey": "id",
"readCapacity": 5,
"writeCapacity": 5
},
"defaults": {
"name": "todo-a1916a6b16ec016b",
"readCapacity": "5",
"writeCapacity": "5"
},
"outputs": {
"arn": "arn:aws:dynamodb:us-east-2:153052954103:table/todo-a1916a6b16ec016b",
"attribute": [
{
"name": "id",
"type": "S"
}
],
"globalSecondaryIndex": [],
"hashKey": "id",
"id": "todo-a1916a6b16ec016b",
"localSecondaryIndex": [],
"name": "todo-a1916a6b16ec016b",
"readCapacity": "5",
"writeCapacity": "5"
}
},
{
"urn": "urn:pulumi:foo::todo::cloud:table:Table::todo",
"custom": false,
"type": "cloud:table:Table",
"inputs": {
"primaryKey": "id",
"primaryKeyType": "string"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:s3/bucket:Bucket::todo",
"custom": true,
"id": "todo-8c10043f3d2b0e28",
"type": "aws:s3/bucket:Bucket",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"defaults": {
"acl": "private",
"bucket": "todo-8c10043f3d2b0e28",
"forceDestroy": false
},
"outputs": {
"accelerationStatus": "",
"acl": "private",
"arn": "arn:aws:s3:::todo-8c10043f3d2b0e28",
"bucket": "todo-8c10043f3d2b0e28",
"bucketDomainName": "todo-8c10043f3d2b0e28.s3.amazonaws.com",
"forceDestroy": false,
"hostedZoneId": "Z2O1EMRO9K5GLX",
"id": "todo-8c10043f3d2b0e28",
"logging": [],
"region": "us-east-2",
"requestPayer": "BucketOwner",
"tags": {},
"versioning": [
{
"enabled": false,
"mfaDelete": false
}
],
"website": []
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/role:Role::todo4c238266",
"custom": true,
"id": "todo4c238266-c22303f113387c32",
"type": "aws:iam/role:Role",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"apigateway.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}"
},
"defaults": {
"forceDetachPolicies": false,
"name": "todo4c238266-c22303f113387c32",
"path": "/"
},
"outputs": {
"arn": "arn:aws:iam::153052954103:role/todo4c238266-c22303f113387c32",
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"apigateway.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
"createDate": "2017-11-08T19:57:49Z",
"forceDetachPolicies": false,
"id": "todo4c238266-c22303f113387c32",
"name": "todo4c238266-c22303f113387c32",
"path": "/",
"uniqueId": "AROAIZQT7GOCLELAEWHT2"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/rolePolicyAttachment:RolePolicyAttachment::todo4c238266",
"custom": true,
"id": "todo4c238266-c22303f113387c32-20171108195750237000000001",
"type": "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"policyArn": "arn:aws:iam::aws:policy/AmazonS3FullAccess",
"role": "todo4c238266-c22303f113387c32"
},
"outputs": {
"id": "todo4c238266-c22303f113387c32-20171108195750237000000001",
"policyArn": "arn:aws:iam::aws:policy/AmazonS3FullAccess",
"role": "todo4c238266-c22303f113387c32"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:s3/bucketObject:BucketObject::todo4c238266/favicon.ico",
"custom": true,
"id": "todo4c238266/favicon.ico",
"type": "aws:s3/bucketObject:BucketObject",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"bucket": "todo-8c10043f3d2b0e28",
"contentType": "image/x-icon",
"key": "todo4c238266/favicon.ico",
"source": {
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
"hash": "3e928d52d10b060711c530e190e862cb8c1e32ae582da57a633d197c09475081",
"path": "/Users/luke/go/src/github.com/pulumi/pulumi-cloud/examples/todo/www/favicon.ico"
}
},
"defaults": {
"acl": "private",
"source": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-asset750331830"
},
"outputs": {
"acl": "private",
"bucket": "todo-8c10043f3d2b0e28",
"cacheControl": "",
"contentDisposition": "",
"contentEncoding": "",
"contentLanguage": "",
"contentType": "image/x-icon",
"etag": "8b29bc54ef1e39d577bd5a5157c7d285",
"id": "todo4c238266/favicon.ico",
"key": "todo4c238266/favicon.ico",
"serverSideEncryption": "",
"source": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-asset678329245",
"storageClass": "STANDARD",
"tags": {},
"versionId": "",
"websiteRedirect": ""
}
},
{
"urn": "urn:pulumi:foo::todo::aws:s3/bucketObject:BucketObject::todo4c238266/index.html",
"custom": true,
"id": "todo4c238266/index.html",
"type": "aws:s3/bucketObject:BucketObject",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"bucket": "todo-8c10043f3d2b0e28",
"contentType": "text/html",
"key": "todo4c238266/index.html",
"source": {
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
"hash": "064df7eb98909d2a5f50e74dfb94899d57d0aaba1ffc580541ca79afebf87bb7",
"path": "/Users/luke/go/src/github.com/pulumi/pulumi-cloud/examples/todo/www/index.html"
}
},
"defaults": {
"acl": "private",
"source": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-asset637927000"
},
"outputs": {
"acl": "private",
"bucket": "todo-8c10043f3d2b0e28",
"cacheControl": "",
"contentDisposition": "",
"contentEncoding": "",
"contentLanguage": "",
"contentType": "text/html",
"etag": "b996a167b3143d3a2fc3255ec69dbad4",
"id": "todo4c238266/index.html",
"key": "todo4c238266/index.html",
"serverSideEncryption": "",
"source": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-asset523489751",
"storageClass": "STANDARD",
"tags": {},
"versionId": "",
"websiteRedirect": ""
}
},
{
"urn": "urn:pulumi:foo::todo::aws:sns/topic:Topic::unhandled-error-topic",
"custom": true,
"id": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53",
"type": "aws:sns/topic:Topic",
"defaults": {
"name": "unhandled-error-topic-7c13e147ce8d9e53"
},
"outputs": {
"arn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53",
"displayName": "",
"id": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53",
"name": "unhandled-error-topic-7c13e147ce8d9e53",
"policy": "{\"Id\":\"__default_policy_ID\",\"Statement\":[{\"Action\":[\"SNS:GetTopicAttributes\",\"SNS:SetTopicAttributes\",\"SNS:AddPermission\",\"SNS:RemovePermission\",\"SNS:DeleteTopic\",\"SNS:Subscribe\",\"SNS:ListSubscriptionsByTopic\",\"SNS:Publish\",\"SNS:Receive\"],\"Condition\":{\"StringEquals\":{\"AWS:SourceOwner\":\"153052954103\"}},\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"*\"},\"Resource\":\"arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53\",\"Sid\":\"__default_statement_ID\"}],\"Version\":\"2008-10-17\"}"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/role:Role::todo035b5d8f-iamrole",
"custom": true,
"id": "todo035b5d8f-iamrole-4c6d0a50781a686f",
"type": "aws:iam/role:Role",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todo035b5d8f",
"inputs": {
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\",\"Sid\":\"\"}]}"
},
"defaults": {
"forceDetachPolicies": false,
"name": "todo035b5d8f-iamrole-4c6d0a50781a686f",
"path": "/"
},
"outputs": {
"arn": "arn:aws:iam::153052954103:role/todo035b5d8f-iamrole-4c6d0a50781a686f",
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
"createDate": "2017-11-08T19:57:56Z",
"forceDetachPolicies": false,
"id": "todo035b5d8f-iamrole-4c6d0a50781a686f",
"name": "todo035b5d8f-iamrole-4c6d0a50781a686f",
"path": "/",
"uniqueId": "AROAJPLTIAHPA4S2PXQPY"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/rolePolicyAttachment:RolePolicyAttachment::todo035b5d8f-iampolicy-0",
"custom": true,
"id": "todo035b5d8f-iamrole-4c6d0a50781a686f-20171108195757731500000002",
"type": "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todo035b5d8f",
"inputs": {
"policyArn": "arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"role": "todo035b5d8f-iamrole-4c6d0a50781a686f"
},
"outputs": {
"id": "todo035b5d8f-iamrole-4c6d0a50781a686f-20171108195757731500000002",
"policyArn": "arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"role": "todo035b5d8f-iamrole-4c6d0a50781a686f"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/rolePolicyAttachment:RolePolicyAttachment::todo035b5d8f-iampolicy-1",
"custom": true,
"id": "todo035b5d8f-iamrole-4c6d0a50781a686f-20171108195759109500000003",
"type": "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todo035b5d8f",
"inputs": {
"policyArn": "arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess",
"role": "todo035b5d8f-iamrole-4c6d0a50781a686f"
},
"outputs": {
"id": "todo035b5d8f-iamrole-4c6d0a50781a686f-20171108195759109500000003",
"policyArn": "arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess",
"role": "todo035b5d8f-iamrole-4c6d0a50781a686f"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:lambda/function:Function::todo035b5d8f",
"custom": true,
"id": "todo035b5d8f-7748c68eadc313c0",
"type": "aws:lambda/function:Function",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todo035b5d8f",
"inputs": {
"code": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"assets": {
".": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"hash": "817deda9f0a4e4358a82e30faeaaab3bb456d0aa62faeb69aa744b3abf180995",
"path": "."
},
"__index.js": {
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
"hash": "dc21f0f3deefc1f33f9aee13b2861a2e6d24810f0f68fbfd2cc9669438cb0f76",
"text": "exports.handler = __1d93ab845c76406f165a33c3b1aa7b72c82a0245;\n\nfunction __1d93ab845c76406f165a33c3b1aa7b72c82a0245() {\n var _this;\n with({ apiGatewayToRequestResponse: __fbf646106cb48cc5348746d6ce09d72037a0bb76, route: { method: \"GET\", path: \"/todo/{id}\", handlers: [ __d2f8baf55a86f7483292ccab09007d22aa150368, __5941ad084d3fce898f986ab0decb5538a0df0be7 ] } }) {\n return (function() {\n\nreturn ((ev, ctx, cb) =\u003e {\n let body;\n if (ev.body !== null) {\n if (ev.isBase64Encoded) {\n body = Buffer.from(ev.body, \"base64\");\n }\n else {\n body = Buffer.from(ev.body, \"utf8\");\n }\n }\n ctx.callbackWaitsForEmptyEventLoop = false;\n const reqres = apiGatewayToRequestResponse(ev, body, cb);\n let i = 0;\n const next = () =\u003e {\n const nextHandler = route.handlers[i++];\n if (nextHandler !== undefined) {\n nextHandler(reqres.req, reqres.res, next);\n }\n };\n next();\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __fbf646106cb48cc5348746d6ce09d72037a0bb76() {\n var _this;\n with({ stageName: \"stage\" }) {\n return (function() {\n\nreturn (function apiGatewayToRequestResponse(ev, body, cb) {\n const response = {\n statusCode: 200,\n headers: {},\n body: Buffer.from([]),\n };\n const req = {\n headers: ev.headers,\n body: body,\n method: ev.httpMethod,\n params: ev.pathParameters,\n query: ev.queryStringParameters,\n path: ev.path,\n baseUrl: \"/\" + stageName,\n hostname: ev.headers[\"Host\"],\n protocol: ev.headers[\"X-Forwarded-Proto\"],\n };\n const res = {\n status: (code) =\u003e {\n response.statusCode = code;\n return res;\n },\n setHeader: (name, value) =\u003e {\n response.headers[name] = value;\n return res;\n },\n write: (data, encoding) =\u003e {\n if (encoding === undefined) {\n encoding = \"utf8\";\n }\n if (typeof data === \"string\") {\n data = Buffer.from(data, encoding);\n }\n response.body = Buffer.concat([response.body, data]);\n return res;\n },\n end: (data, encoding) =\u003e {\n if (data !== undefined) {\n res.write(data, encoding);\n }\n cb(null, {\n statusCode: response.statusCode,\n headers: response.headers,\n isBase64Encoded: true,\n body: response.body.toString(\"base64\"),\n });\n },\n json: (obj) =\u003e {\n res.setHeader(\"content-type\", \"application/json\");\n res.end(JSON.stringify(obj));\n },\n };\n return { req, res };\n})\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __d2f8baf55a86f7483292ccab09007d22aa150368() {\n var _this;\n with({ }) {\n return (function() {\n\nreturn ((req, res, next) =\u003e {\n let auth = req.headers[\"Authorization\"];\n if (auth !== \"Bearer SECRETPASSWORD\") {\n res.status(401).end(\"Authorization header required\");\n return;\n }\n next();\n})\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __5941ad084d3fce898f986ab0decb5538a0df0be7() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, todos: { children: [ { children: [ ], urn: \"urn:pulumi:foo::todo::aws:dynamodb/table:Table::todo\", id: \"todo-a1916a6b16ec016b\", attribute: [ { name: \"id\", type: \"S\" } ], globalSecondaryIndex: [ ], hashKey: \"id\", localSecondaryIndex: [ ], name: \"todo-a1916a6b16ec016b\", readCapacity: \"5\", writeCapacity: \"5\", arn: \"arn:aws:dynamodb:us-east-2:153052954103:table/todo-a1916a6b16ec016b\" } ], urn: \"urn:pulumi:foo::todo::cloud:table:Table::todo\", primaryKey: \"id\", primaryKeyType: \"string\", get: __269a86aab19c88ab77347278ae480b2b3f3dd556, insert: __20c08953d1f10c1ddcff1e9ab6a0759b7516e3e3, scan: __42f6b3f709e32e9aee752e63d003b89c2bc2cad7, update: __124ff881420e47686a76c6dcae1754be8fb33422, delete: __3cfb20cfe7124ca024dfadf60ae1edecc10cf690 } }) {\n return (function() {\n\nreturn ((req, res) =\u003e __awaiter(this, void 0, void 0, function* () {\n console.log(\"GET /todo/\" + req.params[\"id\"]);\n try {\n let item = yield todos.get({ id: req.params[\"id\"] });\n res.status(200).json(item.value);\n }\n catch (err) {\n res.status(500).json(err);\n }\n}))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __492fe142c8be132f2ccfdc443ed720d77b1ef3a6() {\n var _this;\n with({ }) {\n return (function() {\n\nreturn (function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n})\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __269a86aab19c88ab77347278ae480b2b3f3dd556() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query) =\u003e __awaiter(this, void 0, void 0, function* () {\n const result = yield db().get({\n TableName: getTableName(),\n Key: query,\n ConsistentRead: true,\n }).promise();\n return result.Item;\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __32fa8104bfb1107c90c2d18cfcadb353e7323c4c() {\n var _this;\n with({ }) {\n return (function() {\n\nreturn (() =\u003e {\n const awssdk = require(\"aws-sdk\");\n return new awssdk.DynamoDB.DocumentClient();\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __2db1ada17876ecdd7d369ad50a160a38c23d44c4() {\n var _this;\n with({ tableName: \"todo-a1916a6b16ec016b\" }) {\n return (function() {\n\nreturn (function getTableName() {\n // Hack: Because of our outside/inside system for pulumi, tableName is seen as a\n // Computed\u003cstring\u003e on the outside, but a string on the inside. Of course, there's no\n // way to make TypeScript aware of that. So we just fool the typesystem with these\n // explicit casts.\n //\n // see: https://github.com/pulumi/pulumi/issues/331#issuecomment-333280955\n return tableName;\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __20c08953d1f10c1ddcff1e9ab6a0759b7516e3e3() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((item) =\u003e __awaiter(this, void 0, void 0, function* () {\n yield db().put({\n TableName: getTableName(),\n Item: item,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __42f6b3f709e32e9aee752e63d003b89c2bc2cad7() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn (() =\u003e __awaiter(this, void 0, void 0, function* () {\n const result = yield db().scan({\n TableName: getTableName(),\n ConsistentRead: true,\n }).promise();\n return result.Items;\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __124ff881420e47686a76c6dcae1754be8fb33422() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query, updates) =\u003e __awaiter(this, void 0, void 0, function* () {\n let updateExpression = \"\";\n const attributeValues = {};\n for (const key of Object.keys(updates)) {\n const val = updates[key];\n if (updateExpression === \"\") {\n updateExpression += \"SET \";\n }\n else {\n updateExpression += \", \";\n }\n updateExpression += `${key} = :${key}`;\n attributeValues[`:${key}`] = val;\n }\n yield db().update({\n TableName: getTableName(),\n Key: query,\n UpdateExpression: updateExpression,\n ExpressionAttributeValues: attributeValues,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __3cfb20cfe7124ca024dfadf60ae1edecc10cf690() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query) =\u003e __awaiter(this, void 0, void 0, function* () {\n yield db().delete({\n TableName: getTableName(),\n Key: query,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\n"
}
},
"hash": "bd8cb8017488e278e396f1e3b7eea27bc4b376d0adc075593aea9e32da043a38"
},
"deadLetterConfig": [
{
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
}
],
"handler": "__index.handler",
"memorySize": 128,
"role": "arn:aws:iam::153052954103:role/todo035b5d8f-iamrole-4c6d0a50781a686f",
"runtime": "nodejs6.10",
"timeout": 180
},
"defaults": {
"code": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-archive035209546",
"memorySize": "128",
"name": "todo035b5d8f-7748c68eadc313c0",
"publish": false,
"timeout": "180"
},
"outputs": {
"arn": "arn:aws:lambda:us-east-2:153052954103:function:todo035b5d8f-7748c68eadc313c0",
"code": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-archive894239265",
"deadLetterConfig": [
{
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
}
],
"description": "",
"environment": [],
"handler": "__index.handler",
"id": "todo035b5d8f-7748c68eadc313c0",
"invokeArn": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todo035b5d8f-7748c68eadc313c0/invocations",
"kmsKeyArn": "",
"lastModified": "2017-11-08T19:58:07.802+0000",
"memorySize": "128",
"name": "todo035b5d8f-7748c68eadc313c0",
"publish": false,
"qualifiedArn": "arn:aws:lambda:us-east-2:153052954103:function:todo035b5d8f-7748c68eadc313c0:$LATEST",
"role": "arn:aws:iam::153052954103:role/todo035b5d8f-iamrole-4c6d0a50781a686f",
"runtime": "nodejs6.10",
"sourceCodeHash": "Pj7qx3M0/X9sY4nBiLeDFAklTGhYmjG527OkA6cDFgM=",
"tags": {},
"timeout": "180",
"tracingConfig": [
{
"mode": "PassThrough"
}
],
"version": "$LATEST",
"vpcConfig": []
}
},
{
"urn": "urn:pulumi:foo::todo::aws:serverless:Function::todo035b5d8f",
"custom": false,
"type": "aws:serverless:Function",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todo035b5d8f",
"inputs": {
"options": {
"deadLetterConfig": {
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
},
"memorySize": 128,
"policies": [
"arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess"
]
}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:cloudwatch/logGroup:LogGroup::todo035b5d8f-func-logs",
"custom": true,
"id": "/aws/lambda/todo035b5d8f-7748c68eadc313c0",
"type": "aws:cloudwatch/logGroup:LogGroup",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todo035b5d8f",
"inputs": {
"name": "/aws/lambda/todo035b5d8f-7748c68eadc313c0",
"retentionInDays": 1
},
"defaults": {
"retentionInDays": "1"
},
"outputs": {
"arn": "arn:aws:logs:us-east-2:153052954103:log-group:/aws/lambda/todo035b5d8f-7748c68eadc313c0:*",
"id": "/aws/lambda/todo035b5d8f-7748c68eadc313c0",
"name": "/aws/lambda/todo035b5d8f-7748c68eadc313c0",
"retentionInDays": "1",
"tags": {}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/role:Role::pulumi-foo-log-collector-iamrole",
"custom": true,
"id": "pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7",
"type": "aws:iam/role:Role",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::pulumi-foo-log-collector",
"inputs": {
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\",\"Sid\":\"\"}]}"
},
"defaults": {
"forceDetachPolicies": false,
"name": "pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7",
"path": "/"
},
"outputs": {
"arn": "arn:aws:iam::153052954103:role/pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7",
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
"createDate": "2017-11-08T19:58:11Z",
"forceDetachPolicies": false,
"id": "pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7",
"name": "pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7",
"path": "/",
"uniqueId": "AROAJ4VEH3V4TL27YZSSM"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/rolePolicyAttachment:RolePolicyAttachment::pulumi-foo-log-collector-iampolicy-0",
"custom": true,
"id": "pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7-20171108195812293000000004",
"type": "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::pulumi-foo-log-collector",
"inputs": {
"policyArn": "arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"role": "pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7"
},
"outputs": {
"id": "pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7-20171108195812293000000004",
"policyArn": "arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"role": "pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:lambda/function:Function::pulumi-foo-log-collector",
"custom": true,
"id": "pulumi-foo-log-collector-e9cd6ec58f2116ff",
"type": "aws:lambda/function:Function",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::pulumi-foo-log-collector",
"inputs": {
"code": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"assets": {
".": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"hash": "817deda9f0a4e4358a82e30faeaaab3bb456d0aa62faeb69aa744b3abf180995",
"path": "."
},
"__index.js": {
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
"hash": "371d4d8ead106550e5d7e2d0c02dd2e479dba060c765e09f98840fdfe73ea824",
"text": "exports.handler = __88442d0b4365f25c858d35485cca4f999253cc40;\n\nfunction __88442d0b4365f25c858d35485cca4f999253cc40() {\n var _this;\n with({ }) {\n return (function() {\n\nreturn ((ev, ctx, cb) =\u003e {\n const zlib = require(\"zlib\");\n const payload = new Buffer(ev.awslogs.data, \"base64\");\n zlib.gunzip(payload, (err, result) =\u003e {\n if (err !== undefined \u0026\u0026 err !== null) {\n cb(err, null);\n }\n else {\n console.log(result.toString(\"utf8\"));\n cb(null, {});\n }\n });\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\n"
}
},
"hash": "a9d89fe37b8226be55d17695285012d451d2e749947db7a336962eeb65fc1345"
},
"handler": "__index.handler",
"role": "arn:aws:iam::153052954103:role/pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7",
"runtime": "nodejs6.10",
"timeout": 180
},
"defaults": {
"code": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-archive580507404",
"memorySize": "128",
"name": "pulumi-foo-log-collector-e9cd6ec58f2116ff",
"publish": false,
"timeout": "180"
},
"outputs": {
"arn": "arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff",
"code": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-archive451729659",
"deadLetterConfig": [],
"description": "",
"environment": [],
"handler": "__index.handler",
"id": "pulumi-foo-log-collector-e9cd6ec58f2116ff",
"invokeArn": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff/invocations",
"kmsKeyArn": "",
"lastModified": "2017-11-08T19:58:25.717+0000",
"memorySize": "128",
"name": "pulumi-foo-log-collector-e9cd6ec58f2116ff",
"publish": false,
"qualifiedArn": "arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff:$LATEST",
"role": "arn:aws:iam::153052954103:role/pulumi-foo-log-collector-iamrole-2af8f6868f85d7d7",
"runtime": "nodejs6.10",
"sourceCodeHash": "rC8lRsDSOm3VcDZrv8qkZ4LsGBpYHlkcWHRE5qHBWLM=",
"tags": {},
"timeout": "180",
"tracingConfig": [
{
"mode": "PassThrough"
}
],
"version": "$LATEST",
"vpcConfig": []
}
},
{
"urn": "urn:pulumi:foo::todo::aws:serverless:Function::pulumi-foo-log-collector",
"custom": false,
"type": "aws:serverless:Function",
"inputs": {
"options": {
"policies": [
"arn:aws:iam::aws:policy/AWSLambdaFullAccess"
]
}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:lambda/permission:Permission::pulumi-foo-log-collector",
"custom": true,
"id": "pulumi-foo-log-collector-715ade4f6f854187",
"type": "aws:lambda/permission:Permission",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todo035b5d8f",
"inputs": {
"action": "lambda:invokeFunction",
"function": "pulumi-foo-log-collector-e9cd6ec58f2116ff",
"principal": "logs.us-east-2.amazonaws.com"
},
"defaults": {
"statementId": "pulumi-foo-log-collector-715ade4f6f854187"
},
"outputs": {
"action": "lambda:invokeFunction",
"function": "pulumi-foo-log-collector-e9cd6ec58f2116ff",
"id": "pulumi-foo-log-collector-715ade4f6f854187",
"principal": "logs.us-east-2.amazonaws.com",
"qualifier": "",
"statementId": "pulumi-foo-log-collector-715ade4f6f854187"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:cloudwatch/logSubscriptionFilter:LogSubscriptionFilter::todo035b5d8f",
"custom": true,
"id": "cwlsf-2917862896",
"type": "aws:cloudwatch/logSubscriptionFilter:LogSubscriptionFilter",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todo035b5d8f",
"inputs": {
"destinationArn": "arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff",
"filterPattern": "",
"logGroup": "/aws/lambda/todo035b5d8f-7748c68eadc313c0"
},
"defaults": {
"name": "todo035b5d8f-c9b30759625946a3"
},
"outputs": {
"destinationArn": "arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff",
"filterPattern": "",
"id": "cwlsf-2917862896",
"logGroup": "/aws/lambda/todo035b5d8f-7748c68eadc313c0",
"name": "todo035b5d8f-c9b30759625946a3"
}
},
{
"urn": "urn:pulumi:foo::todo::cloud:function:Function::todo035b5d8f",
"custom": false,
"type": "cloud:function:Function",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"handler": {}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/role:Role::todo67876f56-iamrole",
"custom": true,
"id": "todo67876f56-iamrole-ce66deec75ae88fd",
"type": "aws:iam/role:Role",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todo67876f56",
"inputs": {
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\",\"Sid\":\"\"}]}"
},
"defaults": {
"forceDetachPolicies": false,
"name": "todo67876f56-iamrole-ce66deec75ae88fd",
"path": "/"
},
"outputs": {
"arn": "arn:aws:iam::153052954103:role/todo67876f56-iamrole-ce66deec75ae88fd",
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
"createDate": "2017-11-08T19:58:28Z",
"forceDetachPolicies": false,
"id": "todo67876f56-iamrole-ce66deec75ae88fd",
"name": "todo67876f56-iamrole-ce66deec75ae88fd",
"path": "/",
"uniqueId": "AROAJ4OUDFQWKLTUWKJO6"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/rolePolicyAttachment:RolePolicyAttachment::todo67876f56-iampolicy-0",
"custom": true,
"id": "todo67876f56-iamrole-ce66deec75ae88fd-20171108195829869300000005",
"type": "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todo67876f56",
"inputs": {
"policyArn": "arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"role": "todo67876f56-iamrole-ce66deec75ae88fd"
},
"outputs": {
"id": "todo67876f56-iamrole-ce66deec75ae88fd-20171108195829869300000005",
"policyArn": "arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"role": "todo67876f56-iamrole-ce66deec75ae88fd"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/rolePolicyAttachment:RolePolicyAttachment::todo67876f56-iampolicy-1",
"custom": true,
"id": "todo67876f56-iamrole-ce66deec75ae88fd-20171108195831240000000006",
"type": "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todo67876f56",
"inputs": {
"policyArn": "arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess",
"role": "todo67876f56-iamrole-ce66deec75ae88fd"
},
"outputs": {
"id": "todo67876f56-iamrole-ce66deec75ae88fd-20171108195831240000000006",
"policyArn": "arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess",
"role": "todo67876f56-iamrole-ce66deec75ae88fd"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:lambda/function:Function::todo67876f56",
"custom": true,
"id": "todo67876f56-7069ef1500d0e44e",
"type": "aws:lambda/function:Function",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todo67876f56",
"inputs": {
"code": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"assets": {
".": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"hash": "817deda9f0a4e4358a82e30faeaaab3bb456d0aa62faeb69aa744b3abf180995",
"path": "."
},
"__index.js": {
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
"hash": "ece4682cb493cbebe3c503bee17d4566db2fe361528d5b1e86acb48fa2aa7362",
"text": "exports.handler = __a950d2f3106e78658d58f1ab976fb89886d8a56a;\n\nfunction __a950d2f3106e78658d58f1ab976fb89886d8a56a() {\n var _this;\n with({ apiGatewayToRequestResponse: __fbf646106cb48cc5348746d6ce09d72037a0bb76, route: { method: \"POST\", path: \"/todo/{id}\", handlers: [ __83c5bf0f4cf2fd2730ceee79a34c9fb7ee3f9ded ] } }) {\n return (function() {\n\nreturn ((ev, ctx, cb) =\u003e {\n let body;\n if (ev.body !== null) {\n if (ev.isBase64Encoded) {\n body = Buffer.from(ev.body, \"base64\");\n }\n else {\n body = Buffer.from(ev.body, \"utf8\");\n }\n }\n ctx.callbackWaitsForEmptyEventLoop = false;\n const reqres = apiGatewayToRequestResponse(ev, body, cb);\n let i = 0;\n const next = () =\u003e {\n const nextHandler = route.handlers[i++];\n if (nextHandler !== undefined) {\n nextHandler(reqres.req, reqres.res, next);\n }\n };\n next();\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __fbf646106cb48cc5348746d6ce09d72037a0bb76() {\n var _this;\n with({ stageName: \"stage\" }) {\n return (function() {\n\nreturn (function apiGatewayToRequestResponse(ev, body, cb) {\n const response = {\n statusCode: 200,\n headers: {},\n body: Buffer.from([]),\n };\n const req = {\n headers: ev.headers,\n body: body,\n method: ev.httpMethod,\n params: ev.pathParameters,\n query: ev.queryStringParameters,\n path: ev.path,\n baseUrl: \"/\" + stageName,\n hostname: ev.headers[\"Host\"],\n protocol: ev.headers[\"X-Forwarded-Proto\"],\n };\n const res = {\n status: (code) =\u003e {\n response.statusCode = code;\n return res;\n },\n setHeader: (name, value) =\u003e {\n response.headers[name] = value;\n return res;\n },\n write: (data, encoding) =\u003e {\n if (encoding === undefined) {\n encoding = \"utf8\";\n }\n if (typeof data === \"string\") {\n data = Buffer.from(data, encoding);\n }\n response.body = Buffer.concat([response.body, data]);\n return res;\n },\n end: (data, encoding) =\u003e {\n if (data !== undefined) {\n res.write(data, encoding);\n }\n cb(null, {\n statusCode: response.statusCode,\n headers: response.headers,\n isBase64Encoded: true,\n body: response.body.toString(\"base64\"),\n });\n },\n json: (obj) =\u003e {\n res.setHeader(\"content-type\", \"application/json\");\n res.end(JSON.stringify(obj));\n },\n };\n return { req, res };\n})\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __83c5bf0f4cf2fd2730ceee79a34c9fb7ee3f9ded() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, todos: { children: [ { children: [ ], urn: \"urn:pulumi:foo::todo::aws:dynamodb/table:Table::todo\", id: \"todo-a1916a6b16ec016b\", attribute: [ { name: \"id\", type: \"S\" } ], globalSecondaryIndex: [ ], hashKey: \"id\", localSecondaryIndex: [ ], name: \"todo-a1916a6b16ec016b\", readCapacity: \"5\", writeCapacity: \"5\", arn: \"arn:aws:dynamodb:us-east-2:153052954103:table/todo-a1916a6b16ec016b\" } ], urn: \"urn:pulumi:foo::todo::cloud:table:Table::todo\", primaryKey: \"id\", primaryKeyType: \"string\", get: __269a86aab19c88ab77347278ae480b2b3f3dd556, insert: __20c08953d1f10c1ddcff1e9ab6a0759b7516e3e3, scan: __42f6b3f709e32e9aee752e63d003b89c2bc2cad7, update: __124ff881420e47686a76c6dcae1754be8fb33422, delete: __3cfb20cfe7124ca024dfadf60ae1edecc10cf690 } }) {\n return (function() {\n\nreturn ((req, res) =\u003e __awaiter(this, void 0, void 0, function* () {\n console.log(\"POST /todo/\" + req.params[\"id\"]);\n try {\n yield todos.insert({ id: req.params[\"id\"], value: req.body.toString() });\n res.status(201).json({});\n }\n catch (err) {\n res.status(500).json(err);\n }\n}))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __492fe142c8be132f2ccfdc443ed720d77b1ef3a6() {\n var _this;\n with({ }) {\n return (function() {\n\nreturn (function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n})\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __269a86aab19c88ab77347278ae480b2b3f3dd556() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query) =\u003e __awaiter(this, void 0, void 0, function* () {\n const result = yield db().get({\n TableName: getTableName(),\n Key: query,\n ConsistentRead: true,\n }).promise();\n return result.Item;\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __32fa8104bfb1107c90c2d18cfcadb353e7323c4c() {\n var _this;\n with({ }) {\n return (function() {\n\nreturn (() =\u003e {\n const awssdk = require(\"aws-sdk\");\n return new awssdk.DynamoDB.DocumentClient();\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __2db1ada17876ecdd7d369ad50a160a38c23d44c4() {\n var _this;\n with({ tableName: \"todo-a1916a6b16ec016b\" }) {\n return (function() {\n\nreturn (function getTableName() {\n // Hack: Because of our outside/inside system for pulumi, tableName is seen as a\n // Computed\u003cstring\u003e on the outside, but a string on the inside. Of course, there's no\n // way to make TypeScript aware of that. So we just fool the typesystem with these\n // explicit casts.\n //\n // see: https://github.com/pulumi/pulumi/issues/331#issuecomment-333280955\n return tableName;\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __20c08953d1f10c1ddcff1e9ab6a0759b7516e3e3() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((item) =\u003e __awaiter(this, void 0, void 0, function* () {\n yield db().put({\n TableName: getTableName(),\n Item: item,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __42f6b3f709e32e9aee752e63d003b89c2bc2cad7() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn (() =\u003e __awaiter(this, void 0, void 0, function* () {\n const result = yield db().scan({\n TableName: getTableName(),\n ConsistentRead: true,\n }).promise();\n return result.Items;\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __124ff881420e47686a76c6dcae1754be8fb33422() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query, updates) =\u003e __awaiter(this, void 0, void 0, function* () {\n let updateExpression = \"\";\n const attributeValues = {};\n for (const key of Object.keys(updates)) {\n const val = updates[key];\n if (updateExpression === \"\") {\n updateExpression += \"SET \";\n }\n else {\n updateExpression += \", \";\n }\n updateExpression += `${key} = :${key}`;\n attributeValues[`:${key}`] = val;\n }\n yield db().update({\n TableName: getTableName(),\n Key: query,\n UpdateExpression: updateExpression,\n ExpressionAttributeValues: attributeValues,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __3cfb20cfe7124ca024dfadf60ae1edecc10cf690() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query) =\u003e __awaiter(this, void 0, void 0, function* () {\n yield db().delete({\n TableName: getTableName(),\n Key: query,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\n"
}
},
"hash": "95023a27d5a4393ec1440ff2d704997748f68087320f130218deb540c457f14a"
},
"deadLetterConfig": [
{
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
}
],
"handler": "__index.handler",
"memorySize": 128,
"role": "arn:aws:iam::153052954103:role/todo67876f56-iamrole-ce66deec75ae88fd",
"runtime": "nodejs6.10",
"timeout": 180
},
"defaults": {
"code": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-archive069041694",
"memorySize": "128",
"name": "todo67876f56-7069ef1500d0e44e",
"publish": false,
"timeout": "180"
},
"outputs": {
"arn": "arn:aws:lambda:us-east-2:153052954103:function:todo67876f56-7069ef1500d0e44e",
"code": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-archive199670501",
"deadLetterConfig": [
{
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
}
],
"description": "",
"environment": [],
"handler": "__index.handler",
"id": "todo67876f56-7069ef1500d0e44e",
"invokeArn": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todo67876f56-7069ef1500d0e44e/invocations",
"kmsKeyArn": "",
"lastModified": "2017-11-08T19:58:39.700+0000",
"memorySize": "128",
"name": "todo67876f56-7069ef1500d0e44e",
"publish": false,
"qualifiedArn": "arn:aws:lambda:us-east-2:153052954103:function:todo67876f56-7069ef1500d0e44e:$LATEST",
"role": "arn:aws:iam::153052954103:role/todo67876f56-iamrole-ce66deec75ae88fd",
"runtime": "nodejs6.10",
"sourceCodeHash": "8MW5kWvG/GsKUoKzl6eeave6PJsTtx943FRFO/hizFM=",
"tags": {},
"timeout": "180",
"tracingConfig": [
{
"mode": "PassThrough"
}
],
"version": "$LATEST",
"vpcConfig": []
}
},
{
"urn": "urn:pulumi:foo::todo::aws:serverless:Function::todo67876f56",
"custom": false,
"type": "aws:serverless:Function",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todo67876f56",
"inputs": {
"options": {
"deadLetterConfig": {
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
},
"memorySize": 128,
"policies": [
"arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess"
]
}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:cloudwatch/logGroup:LogGroup::todo67876f56-func-logs",
"custom": true,
"id": "/aws/lambda/todo67876f56-7069ef1500d0e44e",
"type": "aws:cloudwatch/logGroup:LogGroup",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todo67876f56",
"inputs": {
"name": "/aws/lambda/todo67876f56-7069ef1500d0e44e",
"retentionInDays": 1
},
"defaults": {
"retentionInDays": "1"
},
"outputs": {
"arn": "arn:aws:logs:us-east-2:153052954103:log-group:/aws/lambda/todo67876f56-7069ef1500d0e44e:*",
"id": "/aws/lambda/todo67876f56-7069ef1500d0e44e",
"name": "/aws/lambda/todo67876f56-7069ef1500d0e44e",
"retentionInDays": "1",
"tags": {}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:cloudwatch/logSubscriptionFilter:LogSubscriptionFilter::todo67876f56",
"custom": true,
"id": "cwlsf-1714177476",
"type": "aws:cloudwatch/logSubscriptionFilter:LogSubscriptionFilter",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todo67876f56",
"inputs": {
"destinationArn": "arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff",
"filterPattern": "",
"logGroup": "/aws/lambda/todo67876f56-7069ef1500d0e44e"
},
"defaults": {
"name": "todo67876f56-b74b44a8d71cb4d7"
},
"outputs": {
"destinationArn": "arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff",
"filterPattern": "",
"id": "cwlsf-1714177476",
"logGroup": "/aws/lambda/todo67876f56-7069ef1500d0e44e",
"name": "todo67876f56-b74b44a8d71cb4d7"
}
},
{
"urn": "urn:pulumi:foo::todo::cloud:function:Function::todo67876f56",
"custom": false,
"type": "cloud:function:Function",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"handler": {}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/role:Role::todoc57917fa-iamrole",
"custom": true,
"id": "todoc57917fa-iamrole-694bcb6442f1858b",
"type": "aws:iam/role:Role",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todoc57917fa",
"inputs": {
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\",\"Sid\":\"\"}]}"
},
"defaults": {
"forceDetachPolicies": false,
"name": "todoc57917fa-iamrole-694bcb6442f1858b",
"path": "/"
},
"outputs": {
"arn": "arn:aws:iam::153052954103:role/todoc57917fa-iamrole-694bcb6442f1858b",
"assumeRolePolicy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
"createDate": "2017-11-08T19:58:44Z",
"forceDetachPolicies": false,
"id": "todoc57917fa-iamrole-694bcb6442f1858b",
"name": "todoc57917fa-iamrole-694bcb6442f1858b",
"path": "/",
"uniqueId": "AROAIGQTRMZ65JGHRMYGI"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/rolePolicyAttachment:RolePolicyAttachment::todoc57917fa-iampolicy-0",
"custom": true,
"id": "todoc57917fa-iamrole-694bcb6442f1858b-20171108195845358400000007",
"type": "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todoc57917fa",
"inputs": {
"policyArn": "arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"role": "todoc57917fa-iamrole-694bcb6442f1858b"
},
"outputs": {
"id": "todoc57917fa-iamrole-694bcb6442f1858b-20171108195845358400000007",
"policyArn": "arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"role": "todoc57917fa-iamrole-694bcb6442f1858b"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:iam/rolePolicyAttachment:RolePolicyAttachment::todoc57917fa-iampolicy-1",
"custom": true,
"id": "todoc57917fa-iamrole-694bcb6442f1858b-20171108195846675000000008",
"type": "aws:iam/rolePolicyAttachment:RolePolicyAttachment",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todoc57917fa",
"inputs": {
"policyArn": "arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess",
"role": "todoc57917fa-iamrole-694bcb6442f1858b"
},
"outputs": {
"id": "todoc57917fa-iamrole-694bcb6442f1858b-20171108195846675000000008",
"policyArn": "arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess",
"role": "todoc57917fa-iamrole-694bcb6442f1858b"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:lambda/function:Function::todoc57917fa",
"custom": true,
"id": "todoc57917fa-2fb58339c66e2b46",
"type": "aws:lambda/function:Function",
"parent": "urn:pulumi:foo::todo::aws:serverless:Function::todoc57917fa",
"inputs": {
"code": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"assets": {
".": {
"4dabf18193072939515e22adb298388d": "0def7320c3a5731c473e5ecbe6d01bc7",
"hash": "817deda9f0a4e4358a82e30faeaaab3bb456d0aa62faeb69aa744b3abf180995",
"path": "."
},
"__index.js": {
"4dabf18193072939515e22adb298388d": "c44067f5952c0a294b673a41bacd8c17",
"hash": "c580d01e8cd138bafec86d9637e36c91f0b02f76a93f905107a706023cc38ffa",
"text": "exports.handler = __e1c9effdafcb58b254eea61ac68abf8a58b1f75f;\n\nfunction __e1c9effdafcb58b254eea61ac68abf8a58b1f75f() {\n var _this;\n with({ apiGatewayToRequestResponse: __fbf646106cb48cc5348746d6ce09d72037a0bb76, route: { method: \"GET\", path: \"/todo\", handlers: [ __cfa3f168a2b5a7b0e8c87c7c05d9f158fc764d0d ] } }) {\n return (function() {\n\nreturn ((ev, ctx, cb) =\u003e {\n let body;\n if (ev.body !== null) {\n if (ev.isBase64Encoded) {\n body = Buffer.from(ev.body, \"base64\");\n }\n else {\n body = Buffer.from(ev.body, \"utf8\");\n }\n }\n ctx.callbackWaitsForEmptyEventLoop = false;\n const reqres = apiGatewayToRequestResponse(ev, body, cb);\n let i = 0;\n const next = () =\u003e {\n const nextHandler = route.handlers[i++];\n if (nextHandler !== undefined) {\n nextHandler(reqres.req, reqres.res, next);\n }\n };\n next();\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __fbf646106cb48cc5348746d6ce09d72037a0bb76() {\n var _this;\n with({ stageName: \"stage\" }) {\n return (function() {\n\nreturn (function apiGatewayToRequestResponse(ev, body, cb) {\n const response = {\n statusCode: 200,\n headers: {},\n body: Buffer.from([]),\n };\n const req = {\n headers: ev.headers,\n body: body,\n method: ev.httpMethod,\n params: ev.pathParameters,\n query: ev.queryStringParameters,\n path: ev.path,\n baseUrl: \"/\" + stageName,\n hostname: ev.headers[\"Host\"],\n protocol: ev.headers[\"X-Forwarded-Proto\"],\n };\n const res = {\n status: (code) =\u003e {\n response.statusCode = code;\n return res;\n },\n setHeader: (name, value) =\u003e {\n response.headers[name] = value;\n return res;\n },\n write: (data, encoding) =\u003e {\n if (encoding === undefined) {\n encoding = \"utf8\";\n }\n if (typeof data === \"string\") {\n data = Buffer.from(data, encoding);\n }\n response.body = Buffer.concat([response.body, data]);\n return res;\n },\n end: (data, encoding) =\u003e {\n if (data !== undefined) {\n res.write(data, encoding);\n }\n cb(null, {\n statusCode: response.statusCode,\n headers: response.headers,\n isBase64Encoded: true,\n body: response.body.toString(\"base64\"),\n });\n },\n json: (obj) =\u003e {\n res.setHeader(\"content-type\", \"application/json\");\n res.end(JSON.stringify(obj));\n },\n };\n return { req, res };\n})\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __cfa3f168a2b5a7b0e8c87c7c05d9f158fc764d0d() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, todos: { children: [ { children: [ ], urn: \"urn:pulumi:foo::todo::aws:dynamodb/table:Table::todo\", id: \"todo-a1916a6b16ec016b\", attribute: [ { name: \"id\", type: \"S\" } ], globalSecondaryIndex: [ ], hashKey: \"id\", localSecondaryIndex: [ ], name: \"todo-a1916a6b16ec016b\", readCapacity: \"5\", writeCapacity: \"5\", arn: \"arn:aws:dynamodb:us-east-2:153052954103:table/todo-a1916a6b16ec016b\" } ], urn: \"urn:pulumi:foo::todo::cloud:table:Table::todo\", primaryKey: \"id\", primaryKeyType: \"string\", get: __269a86aab19c88ab77347278ae480b2b3f3dd556, insert: __20c08953d1f10c1ddcff1e9ab6a0759b7516e3e3, scan: __42f6b3f709e32e9aee752e63d003b89c2bc2cad7, update: __124ff881420e47686a76c6dcae1754be8fb33422, delete: __3cfb20cfe7124ca024dfadf60ae1edecc10cf690 } }) {\n return (function() {\n\nreturn ((req, res) =\u003e __awaiter(this, void 0, void 0, function* () {\n console.log(\"GET /todo\");\n try {\n let items = yield todos.scan();\n res.status(200).json(items);\n }\n catch (err) {\n res.status(500).json(err);\n }\n}))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __492fe142c8be132f2ccfdc443ed720d77b1ef3a6() {\n var _this;\n with({ }) {\n return (function() {\n\nreturn (function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n})\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __269a86aab19c88ab77347278ae480b2b3f3dd556() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query) =\u003e __awaiter(this, void 0, void 0, function* () {\n const result = yield db().get({\n TableName: getTableName(),\n Key: query,\n ConsistentRead: true,\n }).promise();\n return result.Item;\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __32fa8104bfb1107c90c2d18cfcadb353e7323c4c() {\n var _this;\n with({ }) {\n return (function() {\n\nreturn (() =\u003e {\n const awssdk = require(\"aws-sdk\");\n return new awssdk.DynamoDB.DocumentClient();\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __2db1ada17876ecdd7d369ad50a160a38c23d44c4() {\n var _this;\n with({ tableName: \"todo-a1916a6b16ec016b\" }) {\n return (function() {\n\nreturn (function getTableName() {\n // Hack: Because of our outside/inside system for pulumi, tableName is seen as a\n // Computed\u003cstring\u003e on the outside, but a string on the inside. Of course, there's no\n // way to make TypeScript aware of that. So we just fool the typesystem with these\n // explicit casts.\n //\n // see: https://github.com/pulumi/pulumi/issues/331#issuecomment-333280955\n return tableName;\n })\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __20c08953d1f10c1ddcff1e9ab6a0759b7516e3e3() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((item) =\u003e __awaiter(this, void 0, void 0, function* () {\n yield db().put({\n TableName: getTableName(),\n Item: item,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __42f6b3f709e32e9aee752e63d003b89c2bc2cad7() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn (() =\u003e __awaiter(this, void 0, void 0, function* () {\n const result = yield db().scan({\n TableName: getTableName(),\n ConsistentRead: true,\n }).promise();\n return result.Items;\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __124ff881420e47686a76c6dcae1754be8fb33422() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query, updates) =\u003e __awaiter(this, void 0, void 0, function* () {\n let updateExpression = \"\";\n const attributeValues = {};\n for (const key of Object.keys(updates)) {\n const val = updates[key];\n if (updateExpression === \"\") {\n updateExpression += \"SET \";\n }\n else {\n updateExpression += \", \";\n }\n updateExpression += `${key} = :${key}`;\n attributeValues[`:${key}`] = val;\n }\n yield db().update({\n TableName: getTableName(),\n Key: query,\n UpdateExpression: updateExpression,\n ExpressionAttributeValues: attributeValues,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\nfunction __3cfb20cfe7124ca024dfadf60ae1edecc10cf690() {\n var _this;\n with({ __awaiter: __492fe142c8be132f2ccfdc443ed720d77b1ef3a6, db: __32fa8104bfb1107c90c2d18cfcadb353e7323c4c, getTableName: __2db1ada17876ecdd7d369ad50a160a38c23d44c4 }) {\n return (function() {\n\nreturn ((query) =\u003e __awaiter(this, void 0, void 0, function* () {\n yield db().delete({\n TableName: getTableName(),\n Key: query,\n }).promise();\n }))\n\n }).apply(_this).apply(this, arguments);\n }\n}\n\n"
}
},
"hash": "0e2624d7e58513ff02277d9d7ce4f9b6bc32a4cd09002ac82c3b3a31a1257205"
},
"deadLetterConfig": [
{
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
}
],
"handler": "__index.handler",
"memorySize": 128,
"role": "arn:aws:iam::153052954103:role/todoc57917fa-iamrole-694bcb6442f1858b",
"runtime": "nodejs6.10",
"timeout": 180
},
"defaults": {
"code": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-archive769316096",
"memorySize": "128",
"name": "todoc57917fa-2fb58339c66e2b46",
"publish": false,
"timeout": "180"
},
"outputs": {
"arn": "arn:aws:lambda:us-east-2:153052954103:function:todoc57917fa-2fb58339c66e2b46",
"code": "/var/folders/h7/n3r2j28517g5bbvlkn1l_h_80000gn/T/pulumi-archive597830751",
"deadLetterConfig": [
{
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
}
],
"description": "",
"environment": [],
"handler": "__index.handler",
"id": "todoc57917fa-2fb58339c66e2b46",
"invokeArn": "arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todoc57917fa-2fb58339c66e2b46/invocations",
"kmsKeyArn": "",
"lastModified": "2017-11-08T19:58:55.468+0000",
"memorySize": "128",
"name": "todoc57917fa-2fb58339c66e2b46",
"publish": false,
"qualifiedArn": "arn:aws:lambda:us-east-2:153052954103:function:todoc57917fa-2fb58339c66e2b46:$LATEST",
"role": "arn:aws:iam::153052954103:role/todoc57917fa-iamrole-694bcb6442f1858b",
"runtime": "nodejs6.10",
"sourceCodeHash": "JOLZIbcsEiyD/ve/26I7FakO5pE4IcDcHw+So/Mxdlo=",
"tags": {},
"timeout": "180",
"tracingConfig": [
{
"mode": "PassThrough"
}
],
"version": "$LATEST",
"vpcConfig": []
}
},
{
"urn": "urn:pulumi:foo::todo::aws:serverless:Function::todoc57917fa",
"custom": false,
"type": "aws:serverless:Function",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todoc57917fa",
"inputs": {
"options": {
"deadLetterConfig": {
"targetArn": "arn:aws:sns:us-east-2:153052954103:unhandled-error-topic-7c13e147ce8d9e53"
},
"memorySize": 128,
"policies": [
"arn:aws:iam::aws:policy/AWSLambdaFullAccess",
"arn:aws:iam::aws:policy/AmazonEC2ContainerServiceFullAccess"
]
}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:cloudwatch/logGroup:LogGroup::todoc57917fa-func-logs",
"custom": true,
"id": "/aws/lambda/todoc57917fa-2fb58339c66e2b46",
"type": "aws:cloudwatch/logGroup:LogGroup",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todoc57917fa",
"inputs": {
"name": "/aws/lambda/todoc57917fa-2fb58339c66e2b46",
"retentionInDays": 1
},
"defaults": {
"retentionInDays": "1"
},
"outputs": {
"arn": "arn:aws:logs:us-east-2:153052954103:log-group:/aws/lambda/todoc57917fa-2fb58339c66e2b46:*",
"id": "/aws/lambda/todoc57917fa-2fb58339c66e2b46",
"name": "/aws/lambda/todoc57917fa-2fb58339c66e2b46",
"retentionInDays": "1",
"tags": {}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:cloudwatch/logSubscriptionFilter:LogSubscriptionFilter::todoc57917fa",
"custom": true,
"id": "cwlsf-166366141",
"type": "aws:cloudwatch/logSubscriptionFilter:LogSubscriptionFilter",
"parent": "urn:pulumi:foo::todo::cloud:function:Function::todoc57917fa",
"inputs": {
"destinationArn": "arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff",
"filterPattern": "",
"logGroup": "/aws/lambda/todoc57917fa-2fb58339c66e2b46"
},
"defaults": {
"name": "todoc57917fa-80b54f1d26aaf9da"
},
"outputs": {
"destinationArn": "arn:aws:lambda:us-east-2:153052954103:function:pulumi-foo-log-collector-e9cd6ec58f2116ff",
"filterPattern": "",
"id": "cwlsf-166366141",
"logGroup": "/aws/lambda/todoc57917fa-2fb58339c66e2b46",
"name": "todoc57917fa-80b54f1d26aaf9da"
}
},
{
"urn": "urn:pulumi:foo::todo::cloud:function:Function::todoc57917fa",
"custom": false,
"type": "cloud:function:Function",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"handler": {}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:apigateway/restApi:RestApi::todo",
"custom": true,
"id": "eupwl7wu4i",
"type": "aws:apigateway/restApi:RestApi",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"body": "{\"swagger\":\"2.0\",\"info\":{\"title\":\"todo\",\"version\":\"1.0\"},\"paths\":{\"/\":{\"get\":{\"responses\":{\"200\":{\"description\":\"200 response\",\"schema\":{\"type\":\"object\"},\"headers\":{\"Content-Type\":{\"type\":\"string\"},\"content-type\":{\"type\":\"string\"}}},\"400\":{\"description\":\"400 response\"},\"500\":{\"description\":\"500 response\"}},\"x-amazon-apigateway-integration\":{\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"GET\",\"type\":\"aws\",\"responses\":{\"4\\\\d{2}\":{\"statusCode\":\"400\"},\"default\":{\"statusCode\":\"200\",\"responseParameters\":{\"method.response.header.Content-Type\":\"integration.response.header.Content-Type\",\"method.response.header.content-type\":\"integration.response.header.content-type\"}},\"5\\\\d{2}\":{\"statusCode\":\"500\"}},\"uri\":\"arn:aws:apigateway:us-east-2:s3:path/todo-8c10043f3d2b0e28/todo4c238266/index.html\",\"credentials\":\"arn:aws:iam::153052954103:role/todo4c238266-c22303f113387c32\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"parameters\":[{\"name\":\"proxy\",\"in\":\"path\",\"required\":true,\"type\":\"string\"}],\"responses\":{\"200\":{\"description\":\"200 response\",\"schema\":{\"type\":\"object\"},\"headers\":{\"Content-Type\":{\"type\":\"string\"},\"content-type\":{\"type\":\"string\"}}},\"400\":{\"description\":\"400 response\"},\"500\":{\"description\":\"500 response\"}},\"x-amazon-apigateway-integration\":{\"requestParameters\":{\"integration.request.path.proxy\":\"method.request.path.proxy\"},\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"GET\",\"type\":\"aws\",\"responses\":{\"4\\\\d{2}\":{\"statusCode\":\"400\"},\"default\":{\"statusCode\":\"200\",\"responseParameters\":{\"method.response.header.Content-Type\":\"integration.response.header.Content-Type\",\"method.response.header.content-type\":\"integration.response.header.content-type\"}},\"5\\\\d{2}\":{\"statusCode\":\"500\"}},\"uri\":\"arn:aws:apigateway:us-east-2:s3:path/todo-8c10043f3d2b0e28/todo4c238266/{proxy}\",\"credentials\":\"arn:aws:iam::153052954103:role/todo4c238266-c22303f113387c32\"}}},\"/todo/{id}\":{\"get\":{\"x-amazon-apigateway-integration\":{\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"POST\",\"type\":\"aws_proxy\",\"uri\":\"arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todo035b5d8f-7748c68eadc313c0/invocations\"}},\"post\":{\"x-amazon-apigateway-integration\":{\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"POST\",\"type\":\"aws_proxy\",\"uri\":\"arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todo67876f56-7069ef1500d0e44e/invocations\"}}},\"/todo\":{\"get\":{\"x-amazon-apigateway-integration\":{\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"POST\",\"type\":\"aws_proxy\",\"uri\":\"arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todoc57917fa-2fb58339c66e2b46/invocations\"}}}},\"x-amazon-apigateway-binary-media-types\":[\"*/*\"]}"
},
"defaults": {
"name": "todo-ad0751ace493404e"
},
"outputs": {
"body": "{\"swagger\":\"2.0\",\"info\":{\"title\":\"todo\",\"version\":\"1.0\"},\"paths\":{\"/\":{\"get\":{\"responses\":{\"200\":{\"description\":\"200 response\",\"schema\":{\"type\":\"object\"},\"headers\":{\"Content-Type\":{\"type\":\"string\"},\"content-type\":{\"type\":\"string\"}}},\"400\":{\"description\":\"400 response\"},\"500\":{\"description\":\"500 response\"}},\"x-amazon-apigateway-integration\":{\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"GET\",\"type\":\"aws\",\"responses\":{\"4\\\\d{2}\":{\"statusCode\":\"400\"},\"default\":{\"statusCode\":\"200\",\"responseParameters\":{\"method.response.header.Content-Type\":\"integration.response.header.Content-Type\",\"method.response.header.content-type\":\"integration.response.header.content-type\"}},\"5\\\\d{2}\":{\"statusCode\":\"500\"}},\"uri\":\"arn:aws:apigateway:us-east-2:s3:path/todo-8c10043f3d2b0e28/todo4c238266/index.html\",\"credentials\":\"arn:aws:iam::153052954103:role/todo4c238266-c22303f113387c32\"}}},\"/{proxy+}\":{\"x-amazon-apigateway-any-method\":{\"parameters\":[{\"name\":\"proxy\",\"in\":\"path\",\"required\":true,\"type\":\"string\"}],\"responses\":{\"200\":{\"description\":\"200 response\",\"schema\":{\"type\":\"object\"},\"headers\":{\"Content-Type\":{\"type\":\"string\"},\"content-type\":{\"type\":\"string\"}}},\"400\":{\"description\":\"400 response\"},\"500\":{\"description\":\"500 response\"}},\"x-amazon-apigateway-integration\":{\"requestParameters\":{\"integration.request.path.proxy\":\"method.request.path.proxy\"},\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"GET\",\"type\":\"aws\",\"responses\":{\"4\\\\d{2}\":{\"statusCode\":\"400\"},\"default\":{\"statusCode\":\"200\",\"responseParameters\":{\"method.response.header.Content-Type\":\"integration.response.header.Content-Type\",\"method.response.header.content-type\":\"integration.response.header.content-type\"}},\"5\\\\d{2}\":{\"statusCode\":\"500\"}},\"uri\":\"arn:aws:apigateway:us-east-2:s3:path/todo-8c10043f3d2b0e28/todo4c238266/{proxy}\",\"credentials\":\"arn:aws:iam::153052954103:role/todo4c238266-c22303f113387c32\"}}},\"/todo/{id}\":{\"get\":{\"x-amazon-apigateway-integration\":{\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"POST\",\"type\":\"aws_proxy\",\"uri\":\"arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todo035b5d8f-7748c68eadc313c0/invocations\"}},\"post\":{\"x-amazon-apigateway-integration\":{\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"POST\",\"type\":\"aws_proxy\",\"uri\":\"arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todo67876f56-7069ef1500d0e44e/invocations\"}}},\"/todo\":{\"get\":{\"x-amazon-apigateway-integration\":{\"passthroughBehavior\":\"when_no_match\",\"httpMethod\":\"POST\",\"type\":\"aws_proxy\",\"uri\":\"arn:aws:apigateway:us-east-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-2:153052954103:function:todoc57917fa-2fb58339c66e2b46/invocations\"}}}},\"x-amazon-apigateway-binary-media-types\":[\"*/*\"]}",
"createdDate": "2017-11-08T19:58:59Z",
"description": "",
"id": "eupwl7wu4i",
"name": "todo",
"rootResourceId": "jxbhzjh5dd"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:apigateway/deployment:Deployment::todo_f569e86a",
"custom": true,
"id": "4ws2ht",
"type": "aws:apigateway/deployment:Deployment",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"description": "Deployment of version todo_f569e86a",
"restApi": "eupwl7wu4i",
"stageName": ""
},
"outputs": {
"createdDate": "2017-11-08T19:59:03Z",
"description": "Deployment of version todo_f569e86a",
"executionArn": "arn:aws:execute-api:us-east-2:153052954103:eupwl7wu4i/",
"id": "4ws2ht",
"invokeUrl": "https://eupwl7wu4i.execute-api.us-east-2.amazonaws.com/",
"restApi": "eupwl7wu4i",
"stageName": ""
}
},
{
"urn": "urn:pulumi:foo::todo::aws:apigateway/stage:Stage::todo",
"custom": true,
"id": "ags-eupwl7wu4i-stage",
"type": "aws:apigateway/stage:Stage",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"deployment": "4ws2ht",
"description": "The current deployment of the API.",
"restApi": "eupwl7wu4i",
"stageName": "stage"
},
"outputs": {
"cacheClusterEnabled": false,
"cacheClusterSize": "",
"clientCertificateId": "",
"deployment": "4ws2ht",
"description": "The current deployment of the API.",
"documentationVersion": "",
"id": "ags-eupwl7wu4i-stage",
"restApi": "eupwl7wu4i",
"stageName": "stage",
"variables": {}
}
},
{
"urn": "urn:pulumi:foo::todo::aws:lambda/permission:Permission::todo_invoke_f0c1d77e",
"custom": true,
"id": "todo_invoke_f0c1d77e-0225bcbbfa5e7941",
"type": "aws:lambda/permission:Permission",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"action": "lambda:invokeFunction",
"function": "todo035b5d8f-7748c68eadc313c0",
"principal": "apigateway.amazonaws.com",
"sourceArn": "arn:aws:execute-api:us-east-2:153052954103:eupwl7wu4i/stage/GET/todo/{id}"
},
"defaults": {
"statementId": "todo_invoke_f0c1d77e-0225bcbbfa5e7941"
},
"outputs": {
"action": "lambda:invokeFunction",
"function": "todo035b5d8f-7748c68eadc313c0",
"id": "todo_invoke_f0c1d77e-0225bcbbfa5e7941",
"principal": "apigateway.amazonaws.com",
"qualifier": "",
"sourceArn": "arn:aws:execute-api:us-east-2:153052954103:eupwl7wu4i/stage/GET/todo/{id}",
"statementId": "todo_invoke_f0c1d77e-0225bcbbfa5e7941"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:lambda/permission:Permission::todo_invoke_44308e8f",
"custom": true,
"id": "todo_invoke_44308e8f-08a405381ef4ecdb",
"type": "aws:lambda/permission:Permission",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"action": "lambda:invokeFunction",
"function": "todo67876f56-7069ef1500d0e44e",
"principal": "apigateway.amazonaws.com",
"sourceArn": "arn:aws:execute-api:us-east-2:153052954103:eupwl7wu4i/stage/POST/todo/{id}"
},
"defaults": {
"statementId": "todo_invoke_44308e8f-08a405381ef4ecdb"
},
"outputs": {
"action": "lambda:invokeFunction",
"function": "todo67876f56-7069ef1500d0e44e",
"id": "todo_invoke_44308e8f-08a405381ef4ecdb",
"principal": "apigateway.amazonaws.com",
"qualifier": "",
"sourceArn": "arn:aws:execute-api:us-east-2:153052954103:eupwl7wu4i/stage/POST/todo/{id}",
"statementId": "todo_invoke_44308e8f-08a405381ef4ecdb"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:lambda/permission:Permission::todo_invoke_a55f2cbc",
"custom": true,
"id": "todo_invoke_a55f2cbc-b70db0537c54d3d2",
"type": "aws:lambda/permission:Permission",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"action": "lambda:invokeFunction",
"function": "todoc57917fa-2fb58339c66e2b46",
"principal": "apigateway.amazonaws.com",
"sourceArn": "arn:aws:execute-api:us-east-2:153052954103:eupwl7wu4i/stage/GET/todo"
},
"defaults": {
"statementId": "todo_invoke_a55f2cbc-b70db0537c54d3d2"
},
"outputs": {
"action": "lambda:invokeFunction",
"function": "todoc57917fa-2fb58339c66e2b46",
"id": "todo_invoke_a55f2cbc-b70db0537c54d3d2",
"principal": "apigateway.amazonaws.com",
"qualifier": "",
"sourceArn": "arn:aws:execute-api:us-east-2:153052954103:eupwl7wu4i/stage/GET/todo",
"statementId": "todo_invoke_a55f2cbc-b70db0537c54d3d2"
}
},
{
"urn": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"custom": false,
"type": "cloud:http:HttpEndpoint",
"inputs": {
"customDomainNames": [],
"customDomains": [],
"routes": [
{
"handlers": [
{},
{}
],
"method": "GET",
"path": "/todo/{id}"
},
{
"handlers": [
{}
],
"method": "POST",
"path": "/todo/{id}"
},
{
"handlers": [
{}
],
"method": "GET",
"path": "/todo"
}
],
"staticRoutes": [
{
"localPath": "www",
"options": {},
"path": "/"
}
],
"url": "https://eupwl7wu4i.execute-api.us-east-2.amazonaws.com/"
}
},
{
"urn": "urn:pulumi:foo::todo::aws:apigateway/deployment:Deployment::todo_f569e86a",
"delete": true,
"custom": true,
"id": "abc123",
"type": "aws:apigateway/deployment:Deployment",
"parent": "urn:pulumi:foo::todo::cloud:http:HttpEndpoint::todo",
"inputs": {
"description": "Deployment of version todo_f569e86a",
"restApi": "eupwl7wu4i",
"stageName": ""
},
"outputs": {
"createdDate": "2017-11-08T19:59:03Z",
"description": "Deployment of version todo_f569e86a",
"executionArn": "arn:aws:execute-api:us-east-2:153052954103:eupwl7wu4i/",
"id": "abc123",
"invokeUrl": "https://eupwl7wu4i.execute-api.us-east-2.amazonaws.com/",
"restApi": "eupwl7wu4i",
"stageName": ""
}
}
]
}
}