{"id":392202,"date":"2024-06-29T10:16:46","date_gmt":"2024-06-29T10:16:46","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=392202"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=392202","title":{"rendered":"<span>\u041e\u0431\u043b\u0430\u043a\u043e \u0434\u043b\u044f \u0432\u0441\u0435\u0445. \u0421\u0442\u0440\u043e\u0438\u043c CI\/CD pipeline \u0434\u043b\u044f \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u043e\u0431\u043b\u0430\u043a\u0435 SberCloud.Advanced, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c \u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445 Huawei, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u2013 Function Graph. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043d\u0435 \u0442\u0440\u0430\u0442\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041d\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u043a\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e \u043f\u0430\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0410 \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0443\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 5 \u0438 \u043e\u043d\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0442\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0445\u043e\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439, \u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u043e\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u2013 GitHub. <\/p>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Function Graph \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043e\u0442 \u00ab\u043d\u0430\u043a\u043e\u043b\u0435\u043d\u043d\u043e\u0439\u00bb \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0442\u0430\u043a\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e Function Graph. <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0430\u043c \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u044e\u0434\u0436\u0435\u0442\u043e\u0432 \u043d\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0432\u043b\u0435\u0447\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043c\u0430\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043b\u0435\u0433\u043a\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u00a0GitHub \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 GitHub \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 webhook \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043c\u0430\u0441\u0442\u0435\u0440 \u0432\u0435\u0442\u043a\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c&#8230; \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 FunctionGraph, \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 API Gateway. \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u043e\u0432\u044b\u0445\/\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\/\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0437\u0430\u0431\u0438\u0440\u0430\u044f \u043a\u043e\u0434 \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044f \u043a\u043e\u0434 \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0410\u041f\u0418 \u043e\u0431\u043b\u0430\u043a\u0430. \u0421\u0445\u0435\u043c\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/03c\/642\/aa5\/03c642aa532b8964d958cbbaa44a3a24.png\" width=\"899\" height=\"361\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/03c\/642\/aa5\/03c642aa532b8964d958cbbaa44a3a24.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0449\u0438\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, Function Graph \u0443\u043c\u0435\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u00ab\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u00bb, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0432 GitHub \u043a\u0430\u043a \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u0435\u0435, \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u0430\u043a \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0432 API Gateway, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 API, \u0438 \u0442\u0443\u0442 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043e\u0431\u0449\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u0438\u0434\u0430 API_&lt;\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430> (\u043f\u0440\u0438\u043c\u0435\u0440: \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435 \u00abclients.js\u00bb, \u043f\u0440\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 API \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0438\u043c\u044f API_clients_js). \u0412\u0441\u0435 \u044d\u0442\u0438 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u043d\u044b \u0432 \u043a\u043e\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f, \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u043d\u0430 NodeJS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u0434\u0430. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u043e\u043b\u044c \u00ab\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432\u00bb \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u043c\u043e \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 CRUD \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\n<p><a href=\"#cicdfunction\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f CI-CD \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c IAM Agency \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439<\/a>    <\/p>\n<\/li>\n<li>\n<p><a href=\"#projectenv\">\u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#newapigroup\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c API \u0433\u0440\u0443\u043f\u043f\u0443 \u0432 API Gateway<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#getnetid\">\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#newiamagency4vpc\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c IAM Agency \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#dependencies\">\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u0430, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#functionenv\">\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 CI-CD \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#newapigtrigger\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c API Gateway \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0434\u043b\u044f CI-CD \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u0432\u0435\u0431\u0445\u0443\u043a\u0430.<\/a> <\/p>\n<\/li>\n<li>\n<p><a href=\"#webhooksetup\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0432\u0435\u0431\u0445\u0443\u043a \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f GitHub.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#newapp\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/a>    <\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p><a class=\"anchor\" name=\"cicdfunction\" id=\"cicdfunction\"><\/a><\/p>\n<h3>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 GitHub.<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 Function Graph, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a webhook \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 GitHub. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0432\u044b\u0431\u0440\u0430\u0432 Node.JS 12.13 \u043a\u0430\u043a \u0440\u0430\u043d\u0442\u0430\u0439\u043c. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0438\u0436\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 GitHub<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"javascript\">const https=require(\"https\");  exports.handler = async (event, context) => {     let eventBody = JSON.parse(Buffer.from(event.body, 'base64').toString('ascii'));     \/\/Getting the name of the dependency package      const dependencyPackageID = context.getUserData(\"dependency_package\");     let token = context.getToken();     let project_id = context.getProjectID();      \/\/Getting the list of existing functions     const getFunctionsParams = {         host: \"functiongraph.ru-moscow-1.hc.sbercloud.ru\",         method: \"GET\",         path: \"\/v2\/\"+project_id+\"\/fgs\/functions\",         headers: { \"X-Auth-Token\": token }     }     const function_list = JSON.parse(await httpRequest(getFunctionsParams));          \/\/Getting the list of all APIs inside our project API group     const getApisParams={         host: \"apig.ru-moscow-1.hc.sbercloud.ru\",         method: \"GET\",         path: \"\/v1.0\/apigw\/apis?group_id=\"+context.getUserData(\"api_group_id\"),         headers: { \"Content-Type\":\"application\/json\", \"X-Auth-Token\": token }     }     let apisList = JSON.parse(await httpRequest(getApisParams));          \/\/Getting all files - both added and modified and pushing the changes into the FG functions     for (const filename of eventBody.head_commit.modified.concat(eventBody.head_commit.added)){         func_name = filename.replace(\".js\",\"_js\");          const fileGetParams={             host: \"raw.githubusercontent.com\",             method: \"GET\",             port: 443,             path: \"\/\"+eventBody.repository.full_name+\"\/\"+eventBody.after+'\/'+filename,             headers: {Accept: \"application\/vnd.github.v3+json\", \"user-agent\":\"function graph\"}         }         let fileBody = await httpRequest(fileGetParams)          let functionExists = function_list.functions.find(item =>{             return item.func_name == func_name         })         let func_urn = functionExists ? functionExists.func_urn : undefined;         let http_path = \"\/v2\/\"+project_id+\"\/fgs\/functions\" + (functionExists ? \"\/\"+func_urn+\"\/code\" :\"\");          let http_method = functionExists ? \"PUT\": \"POST\";         const createFunctionParams = {             host: \"functiongraph.ru-moscow-1.hc.sbercloud.ru\",             method: http_method,             path: http_path,             headers: { \"Content-Type\":\"application\/json\", \"X-Auth-Token\": token }         }         \/\/Function connection parameters, must be provided as string inside the function creation object         const userData = {             dbhost: context.getUserData(\"dbhost\"),             dbuser: context.getUserData(\"dbuser\"),             dbpwd:  context.getUserData(\"dbpwd\"),             databasename: context.getUserData(\"databasename\")         }         const functionData = {             func_name: func_name,             package:eventBody.repository.name,             code_type:\"inline\",             code_filename: \"index.js\",             handler:\"index.handler\",             memory_size:256,             runtime:\"Node.js12.13\",             timeout: 30,              depend_list: [dependencyPackageID],             func_code : {                 file:Buffer.from(fileBody).toString('base64')             },             xrole: context.getUserData(\"vpc_access_agency_name\"),             func_vpc:{                 vpc_id: context.getUserData(\"vpc_id\"),                 subnet_id: context.getUserData(\"subnet_id\")             },             user_data: JSON.stringify(userData)         }         let createResult = await httpRequest(createFunctionParams, JSON.stringify(functionData));         const funcInfo = JSON.parse(createResult)              \/\/Looking for a API for this function         var existingAPI = apisList.apis.find(item=>{             return item.name==\"API_\"+func_name;         });         if (!existingAPI)         {             \/\/Registering function in API Gateway             const createAPIRequest={                 group_id: context.getUserData(\"api_group_id\"),                 name: \"API_\"+func_name,                 type: 1,                 req_method: \"ANY\", \/\/Allows any HTTP method so we can use this function as Controller                 req_uri: \"\/api\/\"+func_name,                 match_mode: \"SWA\", \/\/We need Prefix match to be able to bypass URI with parameters to this function                 auth_type: \"None\",                 backend_type: \"FUNCTION\",                 func_info : {                     function_urn: funcInfo.func_urn,                     invocation_type: \"sync\",                     timeout: 30000                 }             }             const createAPIParams={                 host: \"apig.ru-moscow-1.hc.sbercloud.ru\",                 method: \"POST\",                 path: \"\/v1.0\/apigw\/apis\",                 headers: { \"Content-Type\":\"application\/json\", \"X-Auth-Token\": token }             }             const registerAPIResult=await httpRequest(createAPIParams, JSON.stringify(createAPIRequest));             const registeredAPI = JSON.parse(registerAPIResult);             existingAPI = registeredAPI;         }         if (!existingAPI.publish_id)         {             const publishAPIRequest={                 env_id: \"DEFAULT_ENVIRONMENT_RELEASE_ID\",                 remark: \"published by GitHub webhook\"             }             const publishAPIParams={                 host: \"apig.ru-moscow-1.hc.sbercloud.ru\",                 method: \"POST\",                 path: '\/v1.0\/apigw\/apis\/publish\/'+existingAPI.id,                 headers: { \"Content-Type\":\"application\/json\", \"X-Auth-Token\": token }             }             const publishAPIResult = await httpRequest(publishAPIParams, JSON.stringify(publishAPIRequest));         }     }     console.log('Successfully deployed functions:'+eventBody.head_commit.modified.concat(eventBody.head_commit.added).join(', '));     const output =     {         'statusCode': 200,         'headers':         {             'Content-Type': 'text\/plain'         },         'isBase64Encoded': false,         'body': 'OK'     }     return output; }  \/\/function to \"promisify\" http requests function httpRequest(params, postData) {     return new Promise(function(resolve, reject) {         try {             var req = https.request(params, function(res) {                 var body = [];                 res.on('data', function(chunk) {                     body.push(chunk);                 });                 \/\/ resolve on end                 res.on('end', function() {                     try {                         body = Buffer.concat(body).toString();                     } catch(e) {                         reject(e);                     }                     resolve(body);                 });             });             \/\/ reject on request error             req.on('error', function(err) {                 reject(err);             });             if (postData) {                 req.write(postData);             }             req.end();         }         catch(e){             console.log(e);             reject(e);         }     }); } <\/code><\/pre>\n<\/div>\n<\/details>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c IAM Agency, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u043d\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u043b\u0430\u043a\u043e\u043c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0430 \u043d\u0443\u0436\u043d\u044b \u043d\u0430 \u0441\u0430\u043c \u0441\u0435\u0440\u0432\u0438\u0441 Function Graph, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430 API Gateway (\u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u0430\u043a \u0431\u044d\u043a\u0435\u043d\u0434). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 IAM \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u043c \u0430\u0433\u0435\u043d\u0441\u0442\u0432\u043e \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a Function Graph:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/192\/9bf\/4f0\/1929bf4f0c2bf9610d79b247f5d9353e.png\" width=\"900\" height=\"421\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/192\/9bf\/4f0\/1929bf4f0c2bf9610d79b247f5d9353e.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u043f\u0440\u0430\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f APIG Administrator \u2013 \u043e\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u00a0\u043d\u043e\u0432\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 API Gateway.<\/p>\n<p>\u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 Configuration \u043d\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u043e \u0430\u0433\u0435\u043d\u0441\u0442\u0432\u043e:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8f7\/6a1\/1e3\/8f76a11e35df977b24a79fb35b145c1b.png\" width=\"505\" height=\"203\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8f7\/6a1\/1e3\/8f76a11e35df977b24a79fb35b145c1b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0440\u044f\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><a class=\"anchor\" name=\"projectenv\" id=\"projectenv\"><\/a><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0448\u0438\u0442\u044c \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0432\u0435\u0434\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0440\u044f\u0434 \u043b\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435, \u0438\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438 \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e, \u043a \u044d\u0442\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f. \u0421\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u043e\u0431\u043b\u0430\u043a\u0430, \u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0447\u0435\u0440\u0435\u0437 HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0438\u0441 API Gateway. \u0421\u0431\u043e\u0440\u043e\u043c \u044d\u0442\u0438\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0437\u0430\u0439\u043c\u0435\u043c\u0441\u044f.<\/p>\n<p><a class=\"anchor\" name=\"newapigroup\" id=\"newapigroup\"><\/a><\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 API \u0433\u0440\u0443\u043f\u043f\u044b \u0432 API Gateway <\/h3>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0438\u0437\u0432\u043d\u0435, \u00a0\u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043d\u0430\u0448\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u0430\u043a \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0432 API Gateway. \u0412-\u043e\u0431\u0449\u0435\u043c, \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u2013 \u043f\u0438\u0448\u0435\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0431\u044d\u043a\u0435\u043d\u0434, \u0430 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043c\u0438\u0440 \u0432\u0430\u0448 \u0431\u044d\u043a\u0435\u043d\u0434 \u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u00ab\u0435\u0434\u0438\u043d\u043e\u0435 \u043e\u043a\u043d\u043e\u00bb \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u043a\u043e\u0435\u0433\u043e \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0410\u041f\u0418. \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u044d\u0442\u043e \u00ab\u0435\u0434\u0438\u043d\u043e\u0435 \u043e\u043a\u043d\u043e\u00bb \u0441\u0435\u0440\u0432\u0438\u0441 API Gateway. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/be1\/307\/8c2\/be13078c2eaa41185c02ff1efaacd3f6.png\" width=\"690\" height=\"285\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/be1\/307\/8c2\/be13078c2eaa41185c02ff1efaacd3f6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0433\u0440\u0443\u043f\u043f\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440. \u041a\u0430\u043a \u0435\u0433\u043e \u043d\u0430\u0439\u0442\u0438, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ac8\/ff2\/6dd\/ac8ff26dd9515593e3a8251509adb75c.png\" width=\"900\" height=\"393\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ac8\/ff2\/6dd\/ac8ff26dd9515593e3a8251509adb75c.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"getnetid\" id=\"getnetid\"><\/a><\/p>\n<h3>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u0435\u0442\u0438<\/h3>\n<p>\u0421 \u0441\u0435\u0442\u044f\u043c\u0438 \u0432\u0441\u0435 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b Virtual Private Cloud, \u0449\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \u043f\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0443 Virtual Private Cloud:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/367\/4a7\/6b7\/3674a76b7e3bae52781c744ac6529e37.png\" width=\"176\" height=\"201\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/367\/4a7\/6b7\/3674a76b7e3bae52781c744ac6529e37.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0441\u0432\u043e\u044e \u0441\u0435\u0442\u044c \u0438 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0441\u0435\u0442\u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 ID:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f49\/cae\/fee\/f49caefee41f49ef5ced44ee16c883b3.png\" width=\"429\" height=\"232\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f49\/cae\/fee\/f49caefee41f49ef5ced44ee16c883b3.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0430\u043c \u0436\u0435, \u0441\u043b\u0435\u0432\u0430, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 Subnets, \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0441\u0432\u043e\u044e \u043f\u043e\u0434\u0441\u0435\u0442\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0430\u0448\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u043e\u0434\u0441\u0435\u0442\u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u043e\u043b\u0435 Network_id. \u0412\u0430\u0436\u043d\u043e (!): \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0438\u043c\u0435\u043d\u043d\u043e network_id, \u00a0\u0430 \u043d\u0435 subnet_id:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0ee\/761\/0bd\/0ee7610bda53b3936b2ee0bf68966f44.png\" width=\"734\" height=\"245\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0ee\/761\/0bd\/0ee7610bda53b3936b2ee0bf68966f44.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"newiamagency4vpc\" id=\"newiamagency4vpc\"><\/a><\/p>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 IAM Agency \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0433\u043b\u0430 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043f\u0440\u043e\u0447\u0438\u043c \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0432 \u0432\u0430\u0448\u0435\u0439 \u0432\u0438\u0440\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u0430\u043c\u043e\u0439 \u0441\u0435\u0442\u0438. \u0414\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c IAM Agency, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0442\u0438. \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0430\u0433\u0435\u043d\u0441\u0442\u0432\u0430 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 Identification and Access Management (IAM), \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 Agencies \u0438 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0430\u0433\u0435\u043d\u0441\u0442\u0432\u043e. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0e8\/720\/9f8\/0e87209f839a0756f58938b18a6cbbbe.png\" width=\"900\" height=\"439\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/0e8\/720\/9f8\/0e87209f839a0756f58938b18a6cbbbe.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"dependencies\" id=\"dependencies\"><\/a><\/p>\n<h3>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439, \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430<\/h3>\n<p>\u041c\u043e\u0436\u043d\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e 100% \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0435\u0437 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0432\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442. \u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0432\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 \u043f\u0430\u043a\u0435\u0442\u043e\u0432. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 Function Graph, \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0412 \u0434\u0435\u0442\u0430\u043b\u044f\u0445 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 <a href=\"https:\/\/support.hc.sbercloud.ru\/en-us\/usermanual\/functiongraph\/functiongraph_01_0391.html\">\u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0430\u043a\u0435\u0442 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437\u0434\u0435\u043b, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 Dependencies \u043d\u0430\u0432\u0435\u0434\u0438\u0442\u0435 \u043a\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 \u043f\u043e\u043b\u0435 Address \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441 \u0432\u0430\u0448\u0438\u043c \u043f\u0430\u043a\u0435\u0442\u043e\u043c \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 zip \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 (\u0441\u043c \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442):<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a00\/216\/8b4\/a002168b465d0fc1fa3f17218f48c7c9.png\" width=\"900\" height=\"304\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a00\/216\/8b4\/a002168b465d0fc1fa3f17218f48c7c9.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"functionenv\" id=\"functionenv\"><\/a><\/p>\n<h3>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 CI-CD \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 CI-CD \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b Configuration \u0438 \u0432 \u0431\u043b\u043e\u043a\u0435 Environment Variables \u0441\u043e\u0437\u0434\u0430\u0435\u043c 5 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/624\/dfb\/dd8\/624dfbdd8b0887cbf69503d29734e46e.png\" width=\"900\" height=\"329\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/624\/dfb\/dd8\/624dfbdd8b0887cbf69503d29734e46e.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432:<\/p>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"229\" width=\"229\">\n<p>dependency_package    <\/p>\n<\/td>\n<td>\n<p>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0430\u043a\u0435\u0442\u0430 \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438.    <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"229\" width=\"229\">\n<p>vpc_id    <\/p>\n<\/td>\n<td>\n<p>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0435\u0442\u0438    <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"229\" width=\"229\">\n<p>subnet_id    <\/p>\n<\/td>\n<td>\n<p>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0441\u0435\u0442\u0438    <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"229\" width=\"229\">\n<p>vpc_access_agency_name    <\/p>\n<\/td>\n<td>\n<p>\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0430\u0433\u0435\u043d\u0441\u0442\u0432\u0430 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0442\u0438    <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"229\" width=\"229\">\n<p>api_group_id    <\/p>\n<\/td>\n<td>\n<p>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 API \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438.    <\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0411\u0414, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0445 \u0442\u0430\u043a\u0436\u0435 \u0432\u0432\u0435\u0441\u0442\u0438 \u0437\u0434\u0435\u0441\u044c \u0438 \u043f\u0440\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u0438 \u044d\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438. \u0412 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0442\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0411\u0414.<\/p>\n<p><a class=\"anchor\" name=\"registerapigtrigger\" id=\"registerapigtrigger\"><\/a><\/p>\n<h2>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f API Gateway \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u0430<\/h2>\n<p>\u0418\u0442\u0430\u043a, \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0432\u043d\u0435\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430\u0448\u0435\u0439 CI\/CD \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0442\u0440\u0438\u0433\u0433\u0435\u0440, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e HTTP \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0435 Triggers \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Create Trigger, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0438\u043f \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430 API Gateway. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e API Group, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u0440\u0435\u0441 \u0432\u044b\u0437\u043e\u0432\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u043b\u0441\u044f \u0441 \u0430\u0434\u0440\u0435\u0441\u043e\u043c \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0433\u0440\u0443\u043f\u043f\u0443, \u0432\u0435\u0440\u043d\u0438\u0442\u0435\u0441\u044c \u0432 \u043e\u043a\u043d\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430 \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0435 \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f21\/eda\/2cd\/f21eda2cdf64f16e59b38e37000fef2f.png\" width=\"683\" height=\"511\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f21\/eda\/2cd\/f21eda2cdf64f16e59b38e37000fef2f.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0441\u043f\u0438\u0441\u043a\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u043b\u0430\u0448\u043a\u0430, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 URL \u2013 \u044d\u0442\u043e \u0438 \u0431\u0443\u0434\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 GitHub:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/869\/275\/eb0\/869275eb0e78ee1e372fedf56ee7b5b3.png\" width=\"716\" height=\"203\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/869\/275\/eb0\/869275eb0e78ee1e372fedf56ee7b5b3.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"webhooksetup\" id=\"webhooksetup\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 webhook \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 GitHub<\/h2>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 webhook \u0434\u043b\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b webhooks \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 Add webhook:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/847\/187\/f6c\/847187f6c8ddbe0278c3e8c1c83239e0.png\" width=\"900\" height=\"232\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/847\/187\/f6c\/847187f6c8ddbe0278c3e8c1c83239e0.png\"\/><figcaption><\/figcaption><\/figure>\n<p><a class=\"anchor\" name=\"newapp\" id=\"newapp\"><\/a><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>\u0412\u0441\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434. \u0414\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 \u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d \u0448\u0430\u0431\u043b\u043e\u043d \u0442\u0430\u043a\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u2013 \u0442\u0438\u043f\u0438\u0447\u043d\u043e\u0433\u043e \u00ab\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0428\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 API \u0434\u043b\u044f CRUD \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f\/\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\/\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439. \u0414\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0411\u0414, \u043e\u043d\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 CI\/CD \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 &#171;\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430&#187;<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"javascript\">\/\/import section. Request your dependencies here let mysql = require('mysql');  \/\/Main function, that receive events.  exports.handler = async (event, context) => {     \/*Where to get information for controller         HTTPMethod: event.httpMethod         extra path: event.pathParameters[\"\"]. For example, if your api is located at \/api\/function\/ path and                     you are calling \/api\/function\/details\/123, then event.pathParameters[\"\"]                      will contain \"details\/123\"                  body:       event.body, but it is base64 encoded. So to get body as object, use:                      const eventBody = JSON.parse(Buffer.from(event.body, 'base64').toString('ascii'))          query:      path.queryStringParameters. Example: \/api\/function?search=something, this object will look like:                     {                         search: \"something\"                     }                           *\/     const eventBody = event.body ? JSON.parse(Buffer.from(event.body, 'base64').toString('ascii')): {}      var controllerOutput={         body: {},         contentType: \"application\/json\"     }     \/* Database connection preparation *\/     var connection = mysql.createConnection({       host     : context.getUserData(\"dbhost\"),       user     : context.getUserData(\"dbuser\"),       password : context.getUserData(\"dbpwd\"),       database : context.getUserData(\"databasename\")     });     connection.connect();     \/*     Typical CRUD controller: action depends on HTTP method     *\/     switch (event.httpMethod) {         case \"GET\":             \/\/GET could mean \"Get list\" and \"Get One\"             if (event.pathParameters[\"\"])               {                 \/\/When pathParameters is not empty, then we have url like \/api\/products\/{id}                 controllerOutput = await getProductDetails(connection, event.pathParameters[\"\"])             }             else             {                 \/\/When nothing in the path - we are looking for the list                 controllerOutput = await getProducts(connection, event.queryStringParameters.name);             }             break;          case \"POST\":             controllerOutput = await createProduct(connection, eventBody);             break;          case \"PUT\":             controllerOutput = await updateProduct(connection, eventBody);             break;          case \"DELETE\":             controllerOutput = await deleteProduct(connection, event.pathParameters[\"\"])             break;         default:             controllerOutput = {                 body: \"Unrecognized command\",                 contentType: \"text\/plain\"             }     }     const output =     {         'statusCode': controllerOutput.statusCode? controllerOutput.statusCode : 200,         'headers':         {             'Content-Type': controllerOutput.contentType         },         'isBase64Encoded': false,         'body': (typeof controllerOutput.body)==='string' ? controllerOutput.body : JSON.stringify(controllerOutput.body)     }     return output; }  async function getProducts(connection, searchForName) {     var SQL = \"select * from products \";     if (searchForName)     {         SQL = SQL +\" where name like ?\";         searchForName=searchForName+'%';     }     SQL = SQL + ' limit 100';     const products = await executeQuery(connection, SQL, [searchForName]);     return {         body: products,         contentType: 'application\/json'     } } async function getProductDetails(connection, productId) {     var SQL = \"select * from products where ID=?\";     const productData = await executeQuery(connection, SQL, [productId]);     return {         body: productData.length>=1? productData[0] : {},         contentType: 'application\/json'     } }  async function createProduct(connection, product) {     const SQL = \"insert into Products (Name, Description, Price) values (?, ?, ?);\";     const result = await executeQuery(connection, SQL, [product.name, product.description, product.price]);     return {         body: 'OK',         statusCode: 201,         contentType: 'text\/plain'     } }  async function updateProduct(connection, product) {     const SQL = \"update Products set Name = ?, description = ?, price = ? where ID=?\";     const result = await executeQuery(connection, SQL, [product.name, product.description, product.price, product.id]);     return {         body: 'OK',         contentType: 'text\/plain'     } }  async function deleteProduct(connection, productId) {     const SQL = \"delete from Products where ID=?\";     const result = await executeQuery(connection, SQL, [productId]);     return {         body: 'OK',         contentType: 'text\/plain'     } }  \/\/Special function to \"promisify\" query execution function executeQuery(connection, querySQL, queryParams){     return new Promise(function(resolve, reject) {         try {             connection.query(querySQL, queryParams, function (error, results, fields) {                 if (error) throw error;                 resolve(results);             });         }         catch (e){             reject(e);         }     }) } <\/code><\/pre>\n<\/div>\n<\/details>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435    <\/h2>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u042d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438 \u0441\u0442\u0430\u0440\u0442\u0430\u043f\u043e\u0432, \u0447\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u043e\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0441\u043a\u0440\u0443\u0442\u043a\u0438, \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043e\u0440\u0433\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u0445 \u0431\u044e\u0434\u0436\u0435\u0442\u043e\u0432, \u0440\u043e\u043b\u0435\u0439 \u0438 \u0442\u0434.<\/p>\n<p>\u0410 \u0435\u0449\u0435 &#8212; \u044d\u0442\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0430\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Function Graph \u0432 SberCloud.Advanced \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u043f\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439. \u0412\u0435\u0434\u044c \u0435\u0441\u043b\u0438 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c \u043a\u0435\u0439\u0441\u0435 \u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u0446\u0435\u043b\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u043e\u0431\u043b\u0430\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u0422\u0430\u043a, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0411\u0414, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435, \u0435\u0441\u043b\u0438 \u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430. <a href=\"https:\/\/www.youtube.com\/watch?v=crJUk9030Ig&amp;t=2s&amp;ab_channel=SberCloud\"><strong>\u0412\u0435\u0431\u0438\u043d\u0430\u0440 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u043a\u0430\u043d\u0430\u043b\u0435<\/strong><\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/568866\/\"> https:\/\/habr.com\/ru\/articles\/568866\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u043c \u043e\u0431\u043b\u0430\u043a\u0435 SberCloud.Advanced, \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c \u043d\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u0445 Huawei, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u2013 Function Graph. \u0421 \u0435\u0433\u043e \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0431\u0440\u043e\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435, \u043d\u0435 \u0442\u0440\u0430\u0442\u044f \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u041d\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u043a\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u043e \u043e \u043f\u0430\u0440\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u0410 \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0443\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 5 \u0438 \u043e\u043d\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0442\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442, \u0430 \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0443\u0436\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0445\u043e\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439, \u043d\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0418 \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u0430\u0436\u043d\u0435\u0439\u0448\u0438\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u043e\u043c \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u2013 GitHub. <\/p>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e Function Graph \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u0430\u043a\u0443\u044e-\u043b\u0438\u0431\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043e\u0442 \u00ab\u043d\u0430\u043a\u043e\u043b\u0435\u043d\u043d\u043e\u0439\u00bb \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a \u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0442\u0430\u043a\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u043d\u0435\u0442\u0440\u0443\u0434\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u043e\u0433\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0433\u043e Function Graph. <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0430\u043c \u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0431\u044e\u0434\u0436\u0435\u0442\u043e\u0432 \u043d\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0432\u043b\u0435\u0447\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u043c\u0430\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043b\u0435\u0433\u043a\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0432 \u00a0GitHub \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0430 \u043f\u0440\u043e\u0442\u044f\u0436\u0435\u043d\u0438\u0438 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 GitHub \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 webhook \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043c\u0430\u0441\u0442\u0435\u0440 \u0432\u0435\u0442\u043a\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c&#8230; \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 FunctionGraph, \u0432\u044b\u0437\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 API Gateway. \u0414\u0430\u043b\u0435\u0435 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u043e\u0432\u044b\u0445\/\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\/\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0437\u0430\u0431\u0438\u0440\u0430\u044f \u043a\u043e\u0434 \u0438\u0437 \u0444\u0430\u0439\u043b\u043e\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u044f \u043a\u043e\u0434 \u044d\u0442\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0410\u041f\u0418 \u043e\u0431\u043b\u0430\u043a\u0430. \u0421\u0445\u0435\u043c\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0449\u0438\u0435 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, Function Graph \u0443\u043c\u0435\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u00ab\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u00bb, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0432 GitHub \u043a\u0430\u043a \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u0430\u043b\u0435\u0435, \u043f\u0440\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u0430\u043a \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0432 API Gateway, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u043c\u0443 API, \u0438 \u0442\u0443\u0442 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u043e\u0431\u0449\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0432\u0438\u0434\u0430 API_&lt;\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430> (\u043f\u0440\u0438\u043c\u0435\u0440: \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043b\u0435\u0436\u0438\u0442 \u0432 \u0444\u0430\u0439\u043b\u0435 \u00abclients.js\u00bb, \u043f\u0440\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 API \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u0438\u043c\u044f API_clients_js). \u0412\u0441\u0435 \u044d\u0442\u0438 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u043d\u044b \u0432 \u043a\u043e\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041d\u0435 \u043b\u0438\u0448\u043d\u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f, \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043d\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u043d\u0430 NodeJS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u043a\u043e\u0434\u0430. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0440\u043e\u043b\u044c \u00ab\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432\u00bb \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0434\u0435\u043c\u043e \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0435 CRUD \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043b\u0430\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439:<\/p>\n<ol>\n<li>\n<p><a href=\"#cicdfunction\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f CI-CD \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c IAM Agency \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439<\/a>    <\/p>\n<\/li>\n<li>\n<p><a href=\"#projectenv\">\u041f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/a><\/p>\n<ul>\n<li>\n<p><a href=\"#newapigroup\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c API \u0433\u0440\u0443\u043f\u043f\u0443 \u0432 API Gateway<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#getnetid\">\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#newiamagency4vpc\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c IAM Agency \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#dependencies\">\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043f\u0430\u043a\u0435\u0442\u0430, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#functionenv\">\u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 CI-CD \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><a href=\"#newapigtrigger\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c API Gateway \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0434\u043b\u044f CI-CD \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u0434\u043b\u044f \u0432\u0435\u0431\u0445\u0443\u043a\u0430.<\/a> <\/p>\n<\/li>\n<li>\n<p><a href=\"#webhooksetup\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u0432\u0435\u0431\u0445\u0443\u043a \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f GitHub.<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#newapp\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/a>    <\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u043e\u0435\u0445\u0430\u043b\u0438.<\/p>\n<p><a class=\"anchor\" name=\"cicdfunction\" id=\"cicdfunction\"><\/a><\/p>\n<h3>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 GitHub.<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 Function Graph, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043a\u0430\u043a webhook \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 GitHub. \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0432\u044b\u0431\u0440\u0430\u0432 Node.JS 12.13 \u043a\u0430\u043a \u0440\u0430\u043d\u0442\u0430\u0439\u043c. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u043d\u0438\u0436\u0435.<\/p>\n<details class=\"spoiler\">\n<summary>\u041a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0437 GitHub<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"javascript\">const https=require(\"https\");  exports.handler = async (event, context) => {     let eventBody = JSON.parse(Buffer.from(event.body, 'base64').toString('ascii'));     \/\/Getting the name of the dependency package      const dependencyPackageID = context.getUserData(\"dependency_package\");     let token = context.getToken();     let project_id = context.getProjectID();      \/\/Getting the list of existing functions     const getFunctionsParams = {         host: \"functiongraph.ru-moscow-1.hc.sbercloud.ru\",         method: \"GET\",         path: \"\/v2\/\"+project_id+\"\/fgs\/functions\",         headers: { \"X-Auth-Token\": token }     }     const function_list = JSON.parse(await httpRequest(getFunctionsParams));          \/\/Getting the list of all APIs inside our project API group     const getApisParams={         host: \"apig.ru-moscow-1.hc.sbercloud.ru\",         method: \"GET\",         path: \"\/v1.0\/apigw\/apis?group_id=\"+context.getUserData(\"api_group_id\"),         headers: { \"Content-Type\":\"application\/json\", \"X-Auth-Token\": token }     }     let apisList = JSON.parse(await httpRequest(getApisParams));          \/\/Getting all files - both added and modified and pushing the changes into the FG functions     for (const filename of eventBody.head_commit.modified.concat(eventBody.head_commit.added)){         func_name = filename.replace(\".js\",\"_js\");          const fileGetParams={             host: \"raw.githubusercontent.com\",             method: \"GET\",             port: 443,             path: \"\/\"+eventBody.repository.full_name+\"\/\"+eventBody.after+'\/'+filename,             headers: {Accept: \"application\/vnd.github.v3+json\", \"user-agent\":\"function graph\"}         }         let fileBody = await httpRequest(fileGetParams)          let functionExists = function_list.functions.find(item =>{             return item.func_name == func_name         })         let func_urn = functionExists ? functionExists.func_urn : undefined;         let http_path = \"\/v2\/\"+project_id+\"\/fgs\/functions\" + (functionExists ? \"\/\"+func_urn+\"\/code\" :\"\");          let http_method = functionExists ? \"PUT\": \"POST\";         const createFunctionParams = {             host: \"functiongraph.ru-moscow-1.hc.sbercloud.ru\",             method: http_method,             path: http_path,             headers: { \"Content-Type\":\"application\/json\", \"X-Auth-Token\": token }         }         \/\/Function connection parameters, must be provided as string inside the function creation object         const userData = {             dbhost: context.getUserData(\"dbhost\"),             dbuser: context.getUserData(\"dbuser\"),             dbpwd:  context.getUserData(\"dbpwd\"),             databasename: context.getUserData(\"databasename\")         }         const functionData = {             func_name: func_name,             package:eventBody.repository.name,             code_type:\"inline\",             code_filename: \"index.js\",             handler:\"index.handler\",             memory_size:256,             runtime:\"Node.js12.13\",             timeout: 30,              depend_list: [dependencyPackageID],             func_code : {                 file:Buffer.from(fileBody).toString('base64')             },             xrole: context.getUserData(\"vpc_access_agency_name\"),             func_vpc:{                 vpc_id: context.getUserData(\"vpc_id\"),                 subnet_id: context.getUserData(\"subnet_id\")             },             user_data: JSON.stringify(userData)         }         let createResult = await httpRequest(createFunctionParams, JSON.stringify(functionData));         const funcInfo = JSON.parse(createResult)              \/\/Looking for a API for this function         var existingAPI = apisList.apis.find(item=>{             return item.name==\"API_\"+func_name;         });         if (!existingAPI)         {             \/\/Registering function in API Gateway             const createAPIRequest={                 group_id: context.getUserData(\"api_group_id\"),                 name: \"API_\"+func_name,                 type: 1,                 req_method: \"ANY\", \/\/Allows any HTTP method so we can use this function as Controller                 req_uri: \"\/api\/\"+func_name,                 match_mode: \"SWA\", \/\/We need Prefix match to be able to bypass URI with parameters to this function                 auth_type: \"None\",                 backend_type: \"FUNCTION\",                 func_info : {                     function_urn: funcInfo.func_urn,                     invocation_type: \"sync\",                     timeout: 30000                 }             }             const createAPIParams={                 host: \"apig.ru-moscow-1.hc.sbercloud.ru\",                 method: \"POST\",                 path: \"\/v1.0\/apigw\/apis\",                 headers: { \"Content-Type\":\"application\/json\", \"X-Auth-Token\": token }             }             const registerAPIResult=await httpRequest(createAPIParams, JSON.stringify(createAPIRequest));             const registeredAPI = JSON.parse(registerAPIResult);             existingAPI = registeredAPI;         }         if (!existingAPI.publish_id)         {             const publishAPIRequest={                 env_id: \"DEFAULT_ENVIRONMENT_RELEASE_ID\",                 remark: \"published by GitHub webhook\"             }             const publishAPIParams={                 host: \"apig.ru-moscow-1.hc.sbercloud.ru\",                 method: \"POST\",                 path: '\/v1.0\/apigw\/apis\/publish\/'+existingAPI.id,                 headers: { \"Content-Type\":\"application\/json\", \"X-Auth-Token\": token }             }             const publishAPIResult = await httpRequest(publishAPIParams, JSON.stringify(publishAPIRequest));         }     }     console.log('Successfully deployed functions:'+eventBody.head_commit.modified.concat(eventBody.head_commit.added).join(', '));     const output =     {         'statusCode': 200,         'headers':         {             'Content-Type': 'text\/plain'         },         'isBase64Encoded': false,         'body': 'OK'     }     return output; }  \/\/function to \"promisify\"<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-392202","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/392202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=392202"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/392202\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=392202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=392202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=392202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}