{"id":55395,"date":"2020-01-19T00:00:00","date_gmt":"2020-01-18T21:00:00","guid":{"rendered":"https:\/\/prohoster.info\/blog\/blog_prohoster\/funktsionalnyj-powershell-s-klassami-ne-oksyumoron-ya-garantiruyu-eto"},"modified":"2020-02-18T14:03:30","modified_gmt":"2020-02-18T11:03:30","slug":"funktsionalnyj-powershell-s-klassami-ne-oksyumoron-ya-garantiruyu-eto","status":"publish","type":"post","link":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/funktsionalnyj-powershell-s-klassami-ne-oksyumoron-ya-garantiruyu-eto","title":{"rendered":"Funktsionaalne PowerShell klassidega ei ole oks\u00fc\u00fcmoron, ma garanteerin seda","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 <noindex><a rel=\"nofollow\" href=\"https:\/\/medium.com\/faun\/functional-powershell-with-classes-820c8e9acd8f\">&quot;Functional PowerShell with Classes.<br \/>\nI promise it\u2019s not an oxymoron&quot;<\/a><\/noindex> \u0430\u0432\u0442\u043e\u0440\u0430 Christopher Kuech.<\/p>\n<p><\/p>\n<p>\u041e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0432 \u043b\u0430\u0434\u0430\u0445 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u043e \u043e\u0431\u0435 \u0432 \u0440\u0430\u0432\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 Powershell. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442, \u0438\u043c\u0435\u044e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0451\u043d \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439; \u041a\u043b\u0430\u0441\u0441\u044b, \u043f\u043e\u0434\u043e\u0431\u043d\u043e struct-\u0430\u043c \u0438 record-\u0430\u043c, \u044d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u0445\u043e\u0434. \u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u041a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435\u043c \u0438\u043c\u0451\u043d \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0441\u0442\u0430\u043d\u0435\u043c \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0445 &quot;\u0442\u044f\u0436\u0451\u043b\u044b\u0445&quot; \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439, \u043a\u0430\u043a \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u043f\u043e\u043b\u0438\u043c\u043e\u0440\u0444\u0438\u0437\u043c, \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u043e\u0441\u0442\u044c (mutability), \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u044f \u043d\u0430\u0448 \u043a\u043e\u0434. \u0414\u0430\u043b\u0435\u0435, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0435 (immutable) \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043e\u0433\u0430\u0442\u0438\u0442\u044c \u041a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u043d\u0430\u0448 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p><\/p>\n<h2 id=\"magiya-kastov\">\u041c\u0430\u0433\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u0432<\/h2>\n<p><\/p>\n<p>\u041a\u0430\u0441\u0442\u044b \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043c\u043e\u0449\u043d\u044b\u0445 \u0444\u0438\u0447 \u0432 Powershell. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u0435\u0442\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u0443, \u0432\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0435\u0441\u044c \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0443\u044e \u0441\u0440\u0435\u0434\u043e\u0439 \u0432 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u044f\u0432\u043d\u044b\u0445 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u0430\u0441\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 [xml] \u043f\u0440\u043e\u0433\u043e\u043d\u0438\u0442 \u0435\u0451 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0434 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e xml. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432 \u0441\u0432\u043e\u0451\u043c \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u041a\u043b\u0430\u0441\u0441\u044b \u0441 \u0442\u043e\u0439 \u0436\u0435 \u0446\u0435\u043b\u044c\u044e.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<h3 id=\"kast-heshtablic\">\u041a\u0430\u0441\u0442 \u0445\u044d\u0448\u0442\u0430\u0431\u043b\u0438\u0446<\/h3>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u0430\u0441\u0442 \u0445\u044d\u0448\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u0442\u0438\u043f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u044d\u0442\u0438\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c. \u0417\u0430\u043e\u0434\u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0449\u0451 \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438\u0438.<\/p>\n<p><\/p>\n<pre><code class=\"powershell\">class Cluster {\n    [ValidatePattern(&quot;^[A-z]+$&quot;)]\n    [string] $Service\n    [ValidateSet(&quot;TEST&quot;, &quot;STAGE&quot;, &quot;CANARY&quot;, &quot;PROD&quot;)]\n    [string] $FlightingRing\n    [ValidateSet(&quot;EastUS&quot;, &quot;WestUS&quot;, &quot;NorthEurope&quot;)]\n    [string] $Region\n    [ValidateRange(0, 255)]\n    [int] $Index\n}\n\n[Cluster]@{\n    Service       = &quot;MyService&quot;\n    FlightingRing = &quot;PROD&quot;\n    Region        = &quot;EastUS&quot;\n    Index         = 2\n}<\/code><\/pre>\n<p><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u0441\u0442 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u0439 \u0432\u044b\u0432\u043e\u0434. \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0432\u044b\u0432\u043e\u0434 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0445\u044d\u0448\u0442\u0430\u0431\u043b\u0438\u0446 Cluster \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u0432 Format-Table c \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0436\u0434\u0435 \u043a\u0430\u0441\u0442\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0445\u044d\u0448\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043a\u043b\u0430\u0441\u0441. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d\u0438 \u0442\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b. \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e hidden \u043f\u0435\u0440\u0435\u0434 \u0432\u0441\u0435\u043c\u0438 \u0442\u0435\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u0438\u0434\u043d\u044b \u0432 \u0432\u044b\u0434\u0430\u0447\u0435.<\/p>\n<p>\n<img decoding=\"async\" alt=\"\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Powershell \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 &mdash; \u043d\u0435 \u043e\u043a\u0441\u044e\u043c\u043e\u0440\u043e\u043d, \u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e \u044d\u0442\u043e\" src=\"\/wp-content\/uploads\/2020\/01\/5984d77f53c6ad7c5fb6207b9712a145.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<\/p>\n<h3 id=\"kast-znacheniy\">\u041a\u0430\u0441\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439<\/h3>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441 \u043e\u0434\u043d\u0438\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u043c, \u043a\u0430\u0441\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a \u0432\u0430\u0448\u0435\u043c\u0443 \u0442\u0438\u043f\u0443 \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0448\u0435\u043c\u0443 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430<\/p>\n<p><\/p>\n<pre><code class=\"powershell\">class Cluster {\n    [ValidatePattern(&quot;^[A-z]+$&quot;)]\n    [string] $Service\n    [ValidateSet(&quot;TEST&quot;, &quot;STAGE&quot;, &quot;CANARY&quot;, &quot;PROD&quot;)]\n    [string] $FlightingRing\n    [ValidateSet(&quot;EastUS&quot;, &quot;WestUS&quot;, &quot;NorthEurope&quot;)]\n    [string] $Region\n    [ValidateRange(0, 255)]\n    [int] $Index\n\n    Cluster([string] $id) {\n        $this.Service, $this.FlightingRing, $this.Region, $this.Index = $id -split &quot;-&quot;\n    }\n}\n\n[Cluster]&quot;MyService-PROD-EastUS-2&quot;<\/code><\/pre>\n<p><\/p>\n<h3 id=\"kast-k-stroke\">\u041a\u0430\u0441\u0442 \u043a \u0441\u0442\u0440\u043e\u043a\u0435<\/h3>\n<p><\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043c\u0435\u0442\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 [string] ToString(), \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044e \u0441\u0442\u0440\u043e\u043a.<\/p>\n<p><\/p>\n<pre><code class=\"powershell\">class Cluster {\n    [ValidatePattern(&quot;^[A-z]+$&quot;)]\n    [string] $Service\n    [ValidateSet(&quot;TEST&quot;, &quot;STAGE&quot;, &quot;CANARY&quot;, &quot;PROD&quot;)]\n    [string] $FlightingRing\n    [ValidateSet(&quot;EastUS&quot;, &quot;WestUS&quot;, &quot;NorthEurope&quot;)]\n    [string] $Region\n    [ValidateRange(0, 255)]\n    [int] $Index\n\n    [string] ToString() {\n        return $this.Service, $this.FlightingRing, $this.Region, $this.Index -join &quot;-&quot;\n    }\n}\n\n$cluster = [Cluster]@{\n    Service       = &quot;MyService&quot;\n    FlightingRing = &quot;PROD&quot;\n    Region        = &quot;EastUS&quot;\n    Index         = 2\n}\n\nWrite-Host &quot;We just created a model for '$cluster'&quot;<\/code><\/pre>\n<p><\/p>\n<h3 id=\"kast-serializovannyh-instansov\">\u041a\u0430\u0441\u0442 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432<\/h3>\n<p><\/p>\n<p>\u041a\u0430\u0441\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0438\u0436\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0442 \u043d\u0430\u0448\u0435\u0439 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Cluster<\/p>\n<p><\/p>\n<pre><code class=\"powershell\"># \u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445\n\n[Cluster]$cluster = Get-Content &quot;.\/my-cluster.json&quot; | ConvertFrom-Json\n[Cluster[]]$clusters = Import-Csv &quot;.\/my-clusters.csv&quot;<\/code><\/pre>\n<h2 id=\"kasty-v-vashem-funkcionalnom-kode\">\u041a\u0430\u0441\u0442\u044b \u0432 \u0432\u0430\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435<\/h2>\n<p><\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0437\u0430\u0442\u0435\u043c \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044e\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0439 \u043d\u0430\u0434 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u043e\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435, \u043a\u043b\u0430\u0441\u0441\u044b \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438 \u0442\u0438\u043f\u043e\u0432.<\/p>\n<p><\/p>\n<h3 id=\"funkcionalnyy-li-powershell-ya-pishu\">\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u0438 Powershell \u044f \u043f\u0438\u0448\u0443?<\/h3>\n<p><\/p>\n<p>\u041c\u043d\u043e\u0433\u043e \u043b\u044e\u0434\u0435\u0439 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0445 \u0438\u0437 C# \u0438\u043b\u0438 \u0441 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043f\u0440\u043e\u0448\u043b\u044b\u043c \u043f\u0438\u0448\u0443\u0442 Powershell, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 \u0421#. \u041f\u043e\u0441\u0442\u0443\u043f\u0430\u044f \u0442\u0430\u043a, \u0432\u044b \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0435\u0441\u044c \u043e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u0443 \u0443\u0441\u0438\u043b\u0435\u043d\u043d\u043e \u043f\u043e\u0433\u0440\u0443\u0437\u0438\u0432\u0448\u0438\u0441\u044c \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 Powershell \u0438\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u0438\u0437\u0443\u0447\u0438\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0435\u0441\u044c \u043d\u0430 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u044b (|), Where-Object, ForEach-Object, Select-Object, Group-Object, Sort-Object \u0438 \u0442. \u0434. \u2014 \u0443 \u0432\u0430\u0441 \u0431\u043e\u043b\u0435\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c, \u0438 \u0432\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 Powershell \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435.<\/p>\n<p><\/p>\n<h3 id=\"funkcionalnoe-ispolzovanie-klassov\">\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432<\/h3>\n<p><\/p>\n<p>\u041a\u0430\u0441\u0442\u044b, \u0445\u043e\u0442\u044f \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0434\u043e\u043c\u0435\u043d\u0430\u043c\u0438. \u0412 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0430\u043f\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f ForEach-Object.<\/p>\n<p><\/p>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 Node \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u0441\u0442 \u043a Datum, \u0438 \u044d\u0442\u043e \u0434\u0430\u0451\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0437\u0440\u044f\u0434\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043d\u0430\u0448 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440 \u0444\u043e\u043a\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0430\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u043d\u0430\u0448\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u0431\u0435\u0440\u0443\u0442 \u043d\u0430 \u0441\u0435\u0431\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e.<\/p>\n<p><\/p>\n<pre><code class=\"powershell\"># \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0441 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430\u043c\u0438 \u0434\u043b\u044f separation of concerns \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430\u0445\n\nclass Node {\n    [ValidateLength(3, 7)]\n    [string] $Name\n    [ValidateSet(&quot;INT&quot;, &quot;PPE&quot;, &quot;PROD&quot;)]\n    [string] $FlightingRing\n    [ValidateSet(&quot;EastUS&quot;, &quot;WestUS&quot;, &quot;NorthEurope&quot;, &quot;WestEurope&quot;)]\n    [string] $Region\n    Node([string] $Name) {\n        $Name -match &quot;([a-z]+)(INT|PPE|PROD)([a-z]+)&quot;\n        $_, $this.Service, $this.FlightingRing, $this.Region = $Matches\n        $this.Name = $Name\n    }\n}\n\nclass Datum {\n    [string] $Name\n    [int] $Value\n    [Node] $Computer\n    [int] Severity() {\n        $this.Name -match &quot;[0-9]+$&quot;\n        return $Matches[0]\n    }\n}\n\nWrite-Host &quot;Urgent Security Audit Issues:&quot;\nImport-Csv &quot;.\/audit-results.csv&quot; `\n    | ForEach-Object {[Datum]$_} `\n    | Where-Object Value -gt 0 `\n    | Group-Object {$_.Severity()} `\n    | Where-Object Name -lt 2 `\n    | ForEach-Object Group `\n    | ForEach-Object Computer `\n    | Where-Object FlightingRing -eq &quot;PROD&quot; `\n    | Sort-Object Name, Region -Unique<\/code><\/pre>\n<h2 id=\"upakovka-klassa-dlya-pereispolzovaniya\">\u0423\u043f\u0430\u043a\u043e\u0432\u043a\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p><\/p>\n<h3 id=\"nichto-ne-stol-uzh-horosho-kak-kazhetsya\">\u041d\u0438\u0447\u0442\u043e \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0443\u0436 \u0445\u043e\u0440\u043e\u0448\u043e, \u043a\u0430\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f<\/h3>\n<p><\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043a\u043b\u0430\u0441\u0441\u044b \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0442\u0435\u043c \u0436\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435; \u043d\u043e \u0445\u0438\u0442\u0440\u043e\u0441\u0442\u0438 \u043a\u043e\u0435-\u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u0430\u0448\u0438 \u043a\u043b\u0430\u0441\u0441\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 .\/my-classes.ps1<\/p>\n<p><\/p>\n<ul>\n<li>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0442\u0441\u043e\u0440\u0441\u0438\u043d\u0433 \u0444\u0430\u0439\u043b\u0430 \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438:. .\/my-classes.ps1. \u042d\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 my-classes.ps1 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442 \u0442\u0430\u043c \u0432\u0441\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 \u0444\u0430\u0439\u043b\u0430.<\/p>\n<p>\n<\/li>\n<li>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c Powershell, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 API (\u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u044b) \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e ScriptsToProcess = &quot;.\/my-classes.ps1&quot; \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0441 \u0442\u0435\u043c \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c: .\/my-classes.ps1 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u0432 \u0432\u0430\u0448\u0435\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438.<\/p>\n<p>\n<\/li>\n<\/ul>\n<p><\/p>\n<p>\u041a\u0430\u043a\u043e\u0439 \u0431\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0432\u044b \u043d\u0438 \u0432\u044b\u0431\u0440\u0430\u043b\u0438, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0442\u0438\u043f\u043e\u0432 Powershell \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u0440\u0443\u043b\u0438\u0442\u044c \u043e\u0434\u043d\u043e\u0438\u043c\u0451\u043d\u043d\u044b\u0435 \u0442\u0438\u043f\u044b, \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442.<br \/>\n\u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0438\u0437 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442 \u0434\u0432\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0432\u044b \u0440\u0438\u0441\u043a\u0443\u0435\u0442\u0435 \u043d\u0430\u0440\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p><\/p>\n<h3 id=\"put-vpered\">\u041f\u0443\u0442\u044c \u0432\u043f\u0435\u0440\u0435\u0434<\/h3>\n<p><\/p>\n<p>\u041b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0442\u0438\u043f\u043e\u0432 \u2014 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043b\u044f \u044e\u0437\u0435\u0440\u043e\u0432 \u0432\u0430\u0448\u0438 \u043a\u043b\u0430\u0441\u0441\u044b. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0436\u0438\u0434\u0430\u0442\u044c, \u0447\u0442\u043e \u044e\u0437\u0435\u0440 \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0439 \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u0442\u0438\u043f, \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0441\u0443. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a Cluster, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e New-Cluster, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0440\u0443\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0430\u0431\u043e\u0440\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 Cluster.<\/p>\n<p><\/p>\n<pre><code class=\"powershell\">class Cluster {\n    [ValidatePattern(&quot;^[A-z]+$&quot;)]\n    [string] $Service\n    [ValidateSet(&quot;TEST&quot;, &quot;STAGE&quot;, &quot;CANARY&quot;, &quot;PROD&quot;)]\n    [string] $FlightingRing\n    [ValidateSet(&quot;EastUS&quot;, &quot;WestUS&quot;, &quot;NorthEurope&quot;)]\n    [string] $Region\n    [ValidateRange(0, 255)]\n    [int] $Index\n}\n\nfunction New-Cluster {\n    [OutputType([Cluster])]\n    Param(\n        [Parameter(Mandatory, ParameterSetName = &quot;Id&quot;, Position = 0)]\n        [ValidateNotNullOrEmpty()]\n        [string] $Id,\n        [Parameter(Mandatory, ParameterSetName = &quot;Components&quot;)]\n        [string] $Service,\n        [Parameter(Mandatory, ParameterSetName = &quot;Components&quot;)]\n        [string] $FlightingRing,\n        [Parameter(Mandatory, ParameterSetName = &quot;Components&quot;)]\n        [string] $Region,\n        [Parameter(Mandatory, ParameterSetName = &quot;Components&quot;)]\n        [int] $Index\n    )\n\n    if ($Id) {\n        $Service, $FlightingRing, $Region, $Index = $Id -split &quot;-&quot;\n    }\n\n    [Cluster]@{\n        Service       = $Service\n        FlightingRing = $FlightingRing\n        Region        = $Region\n        Index         = $Index\n    }\n}\n\nExport-ModuleMember New-Cluster<\/code><\/pre>\n<p><\/p>\n<h4 id=\"chto-eschyo-pochitat\">\u0427\u0442\u043e \u0435\u0449\u0451 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c<\/h4>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.core\/about\/about_classes\">About Classes<\/a><\/noindex><br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/medium.com\/@cjkuech\/defensive-powershell-with-validation-attributes-8e7303e179fd\">Defensive PowerShell<\/a><\/noindex><br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/medium.com\/@cjkuech\/functional-programming-in-powershell-876edde1aadb\">Functional Programming in PowerShell<\/a><\/noindex>\n<\/p>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/484300\/\">habr.com<\/a><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;Functional PowerShell with Classes. I promise it\u2019s not an oxymoron&quot; \u0430\u0432\u0442\u043e\u0440\u0430 Christopher Kuech. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0432 \u043b\u0430\u0434\u0430\u0445 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u043e \u043e\u0431\u0435 \u0432 \u0440\u0430\u0432\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 Powershell. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442, \u0438\u043c\u0435\u044e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0451\u043d \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439; [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":55396,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-55395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;Functional PowerShell with Classes. I promise it\u2019s not an oxymoron&quot; \u0430\u0432\u0442\u043e\u0440\u0430 Christopher Kuech. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0432 \u043b\u0430\u0434\u0430\u0445 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u043e \u043e\u0431\u0435 \u0432 \u0440\u0430\u0432\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 Powershell. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442, \u0438\u043c\u0435\u044e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0451\u043d \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439;\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/funktsionalnyj-powershell-s-klassami-ne-oksyumoron-ya-garantiruyu-eto\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"et_EE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Powershell \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u2014 \u043d\u0435 \u043e\u043a\u0441\u044e\u043c\u043e\u0440\u043e\u043d, \u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e \u044d\u0442\u043e | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;Functional PowerShell with Classes. I promise it\u2019s not an oxymoron&quot; \u0430\u0432\u0442\u043e\u0440\u0430 Christopher Kuech. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0432 \u043b\u0430\u0434\u0430\u0445 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u043e \u043e\u0431\u0435 \u0432 \u0440\u0430\u0432\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 Powershell. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442, \u0438\u043c\u0435\u044e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0451\u043d \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439;\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/funktsionalnyj-powershell-s-klassami-ne-oksyumoron-ya-garantiruyu-eto\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-01-18T21:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-02-18T11:03:30+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Funktsionaalne PowerShell klassidega \u2014 see ei ole oks\u00fcmoron, ma garanteerin seda | ProHoster","description":"Tere, Habr! Tutvustan teile artikli \"Funktsionaalne PowerShell klassidega. Ma luban, et see pole oks\u00fcmoroont\" t\u00f5lget autorilt Christopher Kuech. Objektorienteeritud ja funktsionaalne programmeerimise paradigma v\u00f5ivad tunduda \u00fcksteisega vastuolus, kuid m\u00f5lemat toetatakse Powershellis v\u00f5rdselt. Peaaegu k\u00f5ik programmeerimiskeeled, nii funktsionaalsed kui ka mitte, omavad nime ja v\u00e4\u00e4rtuse laiendatud sidumise vahendeid;","canonical_url":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/funktsionalnyj-powershell-s-klassami-ne-oksyumoron-ya-garantiruyu-eto","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"et_EE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 Powershell \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u2014 \u043d\u0435 \u043e\u043a\u0441\u044e\u043c\u043e\u0440\u043e\u043d, \u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u044e \u044d\u0442\u043e | ProHoster","og:description":"\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0432\u0430\u0448\u0435\u043c\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 &quot;Functional PowerShell with Classes. I promise it\u2019s not an oxymoron&quot; \u0430\u0432\u0442\u043e\u0440\u0430 Christopher Kuech. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0432 \u043b\u0430\u0434\u0430\u0445 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u043e \u043e\u0431\u0435 \u0432 \u0440\u0430\u0432\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 Powershell. \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438 \u043d\u0435\u0442, \u0438\u043c\u0435\u044e\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0451\u043d \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439;","og:url":"https:\/\/prohoster.info\/et\/blog\/administrirovanie\/funktsionalnyj-powershell-s-klassami-ne-oksyumoron-ya-garantiruyu-eto","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-01-18T21:00:00+00:00","article:modified_time":"2020-02-18T11:03:30+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"55395","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 14:36:29","updated":"2022-09-27 14:17:26"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/55395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/comments?post=55395"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/55395\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media\/55396"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media?parent=55395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/categories?post=55395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/tags?post=55395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}