Repository: cloud-custodian/cloud-custodian

Issue:
AWS EBS io2 Support
### Describe the bug

When I run the following policy below I get the following error indicating a lack of support for io2

Error: Error on policy:ebs-io1-io2 resource:ebs
'io2' is not one of ['io1', 'gp2', 'gp3', 'st1', 'sc1']

It seems the code that needs to be updated may be here https://github.com/cloud-custodian/cloud-custodian/blob/9d48bcc97c5967bb7a0bba968e5d0d6c97a4c86b/c7n/resources/ebs.py

### What did you expect to happen?

I expected the solution to support the latest volume generations like io2. io2 has been an EBS volume option since approx 7/2021. 

### Cloud Provider

Amazon Web Services (AWS)

### Cloud Custodian version and dependency information

```shell
Custodian:   0.9.28
Python:      3.9.16 (main, Feb 23 2023, 00:00:00)
             [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)]
Platform:    posix.uname_result(sysname='Linux', nodename='ip-172-31-89-148.ec2.internal', release='6.1.34-58.102.amzn2023.x86_64', version='#1 SMP PREEMPT_DYNAMIC Tue Jun 27 21:38:12 UTC 2023', machine='x86_64')
Using venv:  True
Docker: False
Installed:

argcomplete==3.1.1
attrs==23.1.0
boto3==1.26.157
botocore==1.29.157
docutils==0.18.1
importlib-metadata==5.2.0
jmespath==1.0.1
jsonschema==4.17.3
pyrsistent==0.19.3
python-dateutil==2.8.2
pyyaml==6.0
s3transfer==0.6.1
six==1.16.0
tabulate==0.9.0
urllib3==1.26.16
zipp==3.15.0
```


### Policy

```shell
policies:
 - name: ebs-io1-io2
   resource: ebs
   filters:
    - VolumeType: io1
    - modifyable
   actions:
    - type: modify
      volume-type: io2
```


### Relevant log/traceback output

_No response_

### Extra information or context

_No response_


Discussion:

Resolving patch:
diff --git a/c7n/resources/ebs.py b/c7n/resources/ebs.py
--- a/c7n/resources/ebs.py
+++ b/c7n/resources/ebs.py
@@ -1582,9 +1582,9 @@ class ModifyVolume(BaseAction):
                  volume-type: gp2
 
     `iops-percent` and `size-percent` can be used to modify
-    respectively iops on io1 volumes and volume size.
+    respectively iops on io1/io2 volumes and volume size.
 
-    When converting to io1, `iops-percent` is used to set the iops
+    When converting to io1/io2, `iops-percent` is used to set the iops
     allocation for the new volume against the extant value for the old
     volume.
 
@@ -1614,7 +1614,7 @@ class ModifyVolume(BaseAction):
 
     schema = type_schema(
         'modify',
-        **{'volume-type': {'enum': ['io1', 'gp2', 'gp3', 'st1', 'sc1']},
+        **{'volume-type': {'enum': ['io1', 'io2', 'gp2', 'gp3', 'st1', 'sc1']},
            'shrink': False,
            'size-percent': {'type': 'number'},
            'iops-percent': {'type': 'number'}})
@@ -1644,7 +1644,8 @@ def process_resource_set(self, client, resource_set):
 
         for r in resource_set:
             params = {'VolumeId': r['VolumeId']}
-            if piops and ('io1' in (vtype, r['VolumeType'])):
+            if piops and ('io1' in (vtype, r['VolumeType']) or
+                          'io2' in (vtype, r['VolumeType'])):
                 # default here if we're changing to io1
                 params['Iops'] = max(int(r.get('Iops', 10) * piops / 100.0), 100)
             if psize:


Test patch: