Repository: cloud-custodian/cloud-custodian

Issue:
ELB Add Tag Issue
The `add-tag` action for ELBs is failing if you have more than 1 ELB that matches the filter because of a Boto3 limitation. 

[Boto 3 Docs say:](http://boto3.readthedocs.io/en/latest/reference/services/elb.html?highlight=elb#ElasticLoadBalancing.Client.add_tags)

```
Parameters
LoadBalancerNames (list) --
[REQUIRED]

The name of the load balancer. You can specify one load balancer only.
```

Issue reported by @EricKWLee

 @EricKWLee 's Sample Policy

``` yaml
- name: delete-untagged-elb-volumes
    description: |
      Remove non-tagged elb volumes
    resource: elb
    filters:
      - or:
        - "tag:Environment": absent
    actions:
      - type: mark-for-op
        op: delete
        days: 0.01
```

@EricKWLee 's Run Log

```
2016-06-10 18:08:48,864: custodian.actions:ERROR Exception tagging resource set: [{'Value': 'Resource does not meet policy: delete@2016/06/11', 'Key': 'maid_status'}]  
 An error occurred (ValidationError) when calling the AddTags operation: Exactly 1 LoadBalancerName can be specified
2016-06-10 18:08:48,866: custodian.policy:INFO policy: delete-untagged-elb-volumes action: tagdelayedaction resources: 2 execution_time: 0.47
```

 @EricKWLee 's Error log

```
2016-06-10 12:55:15,927: custodian.actions:INFO Tagging 2 resources for delete on 2016/06/10
2016-06-10 12:55:16,426: custodian.actions:ERROR Exception tagging resource set: [
{'Value': 'Resource does not meet policy: delete@2016/06/10', 'Key': 'status'}
]
An error occurred (ValidationError) when calling the AddTags operation: Exactly 1 LoadBalancerName can be specified. ---
```

ELB Add Tag Issue
The `add-tag` action for ELBs is failing if you have more than 1 ELB that matches the filter because of a Boto3 limitation. 

[Boto 3 Docs say:](http://boto3.readthedocs.io/en/latest/reference/services/elb.html?highlight=elb#ElasticLoadBalancing.Client.add_tags)

```
Parameters
LoadBalancerNames (list) --
[REQUIRED]

The name of the load balancer. You can specify one load balancer only.
```

Issue reported by @EricKWLee

 @EricKWLee 's Sample Policy

``` yaml
- name: delete-untagged-elb-volumes
    description: |
      Remove non-tagged elb volumes
    resource: elb
    filters:
      - or:
        - "tag:Environment": absent
    actions:
      - type: mark-for-op
        op: delete
        days: 0.01
```

@EricKWLee 's Run Log

```
2016-06-10 18:08:48,864: custodian.actions:ERROR Exception tagging resource set: [{'Value': 'Resource does not meet policy: delete@2016/06/11', 'Key': 'maid_status'}]  
 An error occurred (ValidationError) when calling the AddTags operation: Exactly 1 LoadBalancerName can be specified
2016-06-10 18:08:48,866: custodian.policy:INFO policy: delete-untagged-elb-volumes action: tagdelayedaction resources: 2 execution_time: 0.47
```

 @EricKWLee 's Error log

```
2016-06-10 12:55:15,927: custodian.actions:INFO Tagging 2 resources for delete on 2016/06/10
2016-06-10 12:55:16,426: custodian.actions:ERROR Exception tagging resource set: [
{'Value': 'Resource does not meet policy: delete@2016/06/10', 'Key': 'status'}
]
An error occurred (ValidationError) when calling the AddTags operation: Exactly 1 LoadBalancerName can be specified. ---
```



Discussion:
i'll cut a release with this in the next 24hrs.

i'll cut a release with this in the next 24hrs.


Resolving patch:
diff --git a/c7n/tags.py b/c7n/tags.py
--- a/c7n/tags.py
+++ b/c7n/tags.py
@@ -678,7 +678,10 @@ def process(self, resources):
 
         tags = [{'Key': tag, 'Value': msg}]
 
-        batch_size = self.data.get('batch_size', self.batch_size)
+        # if the tag implementation has a specified batch size, it's typically
+        # due to some restraint on the api so we defer to that.
+        batch_size = getattr(
+            self.manager.action_registry.get('tag'), 'batch_size', self.batch_size)
 
         client = self.get_client()
         _common_tag_processer(


Test patch: