We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
eks update action
https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `c7n/resources/eks.py`
Content:
```
1 # Copyright 2018 Capital One Services, LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 from __future__ import absolute_import, division, print_function, unicode_literals
15 
16 from c7n.actions import Action
17 from c7n.filters.vpc import SecurityGroupFilter, SubnetFilter, VpcFilter
18 from c7n.manager import resources
19 from c7n.query import QueryResourceManager
20 from c7n.utils import local_session, type_schema
21 
22 
23 @resources.register('eks')
24 class EKS(QueryResourceManager):
25 
26     class resource_type(object):
27         service = 'eks'
28         enum_spec = ('list_clusters', 'clusters', None)
29         arn = 'arn'
30         detail_spec = ('describe_cluster', 'name', None, 'cluster')
31         id = name = 'name'
32         date = 'createdAt'
33         dimension = None
34         filter_name = None
35 
36 
37 @EKS.filter_registry.register('subnet')
38 class EKSSubnetFilter(SubnetFilter):
39 
40     RelatedIdsExpression = "resourcesVpcConfig.subnetIds[]"
41 
42 
43 @EKS.filter_registry.register('security-group')
44 class EKSSGFilter(SecurityGroupFilter):
45 
46     RelatedIdsExpression = "resourcesVpcConfig.securityGroupIds[]"
47 
48 
49 @EKS.filter_registry.register('vpc')
50 class EKSVpcFilter(VpcFilter):
51 
52     RelatedIdsExpression = 'resourcesVpcConfig.vpcId'
53 
54 
55 @EKS.action_registry.register('delete')
56 class Delete(Action):
57 
58     schema = type_schema('delete')
59     permissions = ('eks:DeleteCluster',)
60 
61     def process(self, resources):
62         client = local_session(self.manager.session_factory).client('eks')
63         for r in resources:
64             try:
65                 client.delete_cluster(name=r['name'])
66             except client.exceptions.ResourceNotFoundException:
67                 continue
68
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/c7n/resources/eks.py b/c7n/resources/eks.py
--- a/c7n/resources/eks.py
+++ b/c7n/resources/eks.py
@@ -19,6 +19,8 @@
 from c7n.query import QueryResourceManager
 from c7n.utils import local_session, type_schema
 
+from .aws import shape_validate
+
 
 @resources.register('eks')
 class EKS(QueryResourceManager):
@@ -52,6 +54,37 @@
     RelatedIdsExpression = 'resourcesVpcConfig.vpcId'
 
 
+@EKS.action_registry.register('update-config')
+class UpdateConfig(Action):
+
+    schema = type_schema(
+        'update-config', resourcesVpcConfig={'type': 'object'},
+        required=('resourcesVpcConfig',))
+    permissions = ('eks:UpdateClusterConfig',)
+    shape = 'UpdateClusterConfigRequest'
+
+    def validate(self):
+        cfg = dict(self.data)
+        cfg['name'] = 'validate'
+        cfg.pop('type')
+        return shape_validate(
+            cfg, self.shape, self.manager.resource_type.service)
+
+    def process(self, resources):
+        client = local_session(self.manager.session_factory).client('eks')
+        state_filtered = 0
+        for r in resources:
+            if r['status'] != 'ACTIVE':
+                state_filtered += 1
+                continue
+            client.update_cluster_config(
+                name=r['name'],
+                resourcesVpcConfig=self.data['resourcesVpcConfig'])
+        if state_filtered:
+            self.log.warning(
+                "Filtered %d of %d clusters due to state", state_filtered, len(resources))
+
+
 @EKS.action_registry.register('delete')
 class Delete(Action):

{"golden_diff": "diff --git a/c7n/resources/eks.py b/c7n/resources/eks.py\n--- a/c7n/resources/eks.py\n+++ b/c7n/resources/eks.py\n@@ -19,6 +19,8 @@\n from c7n.query import QueryResourceManager\n from c7n.utils import local_session, type_schema\n \n+from .aws import shape_validate\n+\n \n @resources.register('eks')\n class EKS(QueryResourceManager):\n@@ -52,6 +54,37 @@\n     RelatedIdsExpression = 'resourcesVpcConfig.vpcId'\n \n \n+@EKS.action_registry.register('update-config')\n+class UpdateConfig(Action):\n+\n+    schema = type_schema(\n+        'update-config', resourcesVpcConfig={'type': 'object'},\n+        required=('resourcesVpcConfig',))\n+    permissions = ('eks:UpdateClusterConfig',)\n+    shape = 'UpdateClusterConfigRequest'\n+\n+    def validate(self):\n+        cfg = dict(self.data)\n+        cfg['name'] = 'validate'\n+        cfg.pop('type')\n+        return shape_validate(\n+            cfg, self.shape, self.manager.resource_type.service)\n+\n+    def process(self, resources):\n+        client = local_session(self.manager.session_factory).client('eks')\n+        state_filtered = 0\n+        for r in resources:\n+            if r['status'] != 'ACTIVE':\n+                state_filtered += 1\n+                continue\n+            client.update_cluster_config(\n+                name=r['name'],\n+                resourcesVpcConfig=self.data['resourcesVpcConfig'])\n+        if state_filtered:\n+            self.log.warning(\n+                \"Filtered %d of %d clusters due to state\", state_filtered, len(resources))\n+\n+\n @EKS.action_registry.register('delete')\n class Delete(Action):\n", "issue": "eks update action\nhttps://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html\n", "before_files": [{"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom c7n.actions import Action\nfrom c7n.filters.vpc import SecurityGroupFilter, SubnetFilter, VpcFilter\nfrom c7n.manager import resources\nfrom c7n.query import QueryResourceManager\nfrom c7n.utils import local_session, type_schema\n\n\n@resources.register('eks')\nclass EKS(QueryResourceManager):\n\n    class resource_type(object):\n        service = 'eks'\n        enum_spec = ('list_clusters', 'clusters', None)\n        arn = 'arn'\n        detail_spec = ('describe_cluster', 'name', None, 'cluster')\n        id = name = 'name'\n        date = 'createdAt'\n        dimension = None\n        filter_name = None\n\n\n@EKS.filter_registry.register('subnet')\nclass EKSSubnetFilter(SubnetFilter):\n\n    RelatedIdsExpression = \"resourcesVpcConfig.subnetIds[]\"\n\n\n@EKS.filter_registry.register('security-group')\nclass EKSSGFilter(SecurityGroupFilter):\n\n    RelatedIdsExpression = \"resourcesVpcConfig.securityGroupIds[]\"\n\n\n@EKS.filter_registry.register('vpc')\nclass EKSVpcFilter(VpcFilter):\n\n    RelatedIdsExpression = 'resourcesVpcConfig.vpcId'\n\n\n@EKS.action_registry.register('delete')\nclass Delete(Action):\n\n    schema = type_schema('delete')\n    permissions = ('eks:DeleteCluster',)\n\n    def process(self, resources):\n        client = local_session(self.manager.session_factory).client('eks')\n        for r in resources:\n            try:\n                client.delete_cluster(name=r['name'])\n            except client.exceptions.ResourceNotFoundException:\n                continue\n", "path": "c7n/resources/eks.py"}], "after_files": [{"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom c7n.actions import Action\nfrom c7n.filters.vpc import SecurityGroupFilter, SubnetFilter, VpcFilter\nfrom c7n.manager import resources\nfrom c7n.query import QueryResourceManager\nfrom c7n.utils import local_session, type_schema\n\nfrom .aws import shape_validate\n\n\n@resources.register('eks')\nclass EKS(QueryResourceManager):\n\n    class resource_type(object):\n        service = 'eks'\n        enum_spec = ('list_clusters', 'clusters', None)\n        arn = 'arn'\n        detail_spec = ('describe_cluster', 'name', None, 'cluster')\n        id = name = 'name'\n        date = 'createdAt'\n        dimension = None\n        filter_name = None\n\n\n@EKS.filter_registry.register('subnet')\nclass EKSSubnetFilter(SubnetFilter):\n\n    RelatedIdsExpression = \"resourcesVpcConfig.subnetIds[]\"\n\n\n@EKS.filter_registry.register('security-group')\nclass EKSSGFilter(SecurityGroupFilter):\n\n    RelatedIdsExpression = \"resourcesVpcConfig.securityGroupIds[]\"\n\n\n@EKS.filter_registry.register('vpc')\nclass EKSVpcFilter(VpcFilter):\n\n    RelatedIdsExpression = 'resourcesVpcConfig.vpcId'\n\n\n@EKS.action_registry.register('update-config')\nclass UpdateConfig(Action):\n\n    schema = type_schema(\n        'update-config', resourcesVpcConfig={'type': 'object'},\n        required=('resourcesVpcConfig',))\n    permissions = ('eks:UpdateClusterConfig',)\n    shape = 'UpdateClusterConfigRequest'\n\n    def validate(self):\n        cfg = dict(self.data)\n        cfg['name'] = 'validate'\n        cfg.pop('type')\n        return shape_validate(\n            cfg, self.shape, self.manager.resource_type.service)\n\n    def process(self, resources):\n        client = local_session(self.manager.session_factory).client('eks')\n        state_filtered = 0\n        for r in resources:\n            if r['status'] != 'ACTIVE':\n                state_filtered += 1\n                continue\n            client.update_cluster_config(\n                name=r['name'],\n                resourcesVpcConfig=self.data['resourcesVpcConfig'])\n        if state_filtered:\n            self.log.warning(\n                \"Filtered %d of %d clusters due to state\", state_filtered, len(resources))\n\n\n@EKS.action_registry.register('delete')\nclass Delete(Action):\n\n    schema = type_schema('delete')\n    permissions = ('eks:DeleteCluster',)\n\n    def process(self, resources):\n        client = local_session(self.manager.session_factory).client('eks')\n        for r in resources:\n            try:\n                client.delete_cluster(name=r['name'])\n            except client.exceptions.ResourceNotFoundException:\n                continue\n", "path": "c7n/resources/eks.py"}]}