Repository: cloud-custodian/cloud-custodian

Issue:
Update error handling on rename-tag for ASG resource
### Describe the bug

When running the following policy the tag update works successfully but the policy still errors out when there are no instances to propogate the tags to.  

- name: aws-asg-fix-tag
  resource: aws.asg
  filters:
    - "tag:Application": present
    - "tag:application": absent
  actions:
      - type: rename-tag
        propagate: true
        source: Application
        dest: application

Error:
ClientError: An error occurred (MissingParameter) when calling the DeleteTags operation: The request must contain the parameter resourceIdSet

### What did you expect to happen?

I expected the policy to succeed and/or have an error explaining that the asg was updated but there were no instances to propogate the tags to.

### Cloud Provider

Amazon Web Services (AWS)

### Cloud Custodian version and dependency information

```shell
Custodian:   0.9.26
Python:      3.8.0 (v3.8.0:fa919fdf25, Oct 14 2019, 10:23:27) 
             [Clang 6.0 (clang-600.0.57)]
Platform:    posix.uname_result(sysname='Darwin', nodename='kristen-MacBook-Pro', release='22.4.0', version='Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000', machine='x86_64')
Using venv:  True
Docker: False
Installed: 

PyJWT==2.6.0
adal==1.2.7
applicationinsights==0.11.10
apscheduler==3.10.1
argcomplete==3.0.5
attrs==22.2.0
azure-common==1.1.28
azure-core==1.26.4
azure-cosmos==3.2.0
azure-cosmosdb-nspkg==2.0.2
azure-cosmosdb-table==1.0.6
azure-functions==1.13.3
azure-graphrbac==0.61.1
azure-identity==1.12.0
azure-keyvault==4.2.0
azure-keyvault-certificates==4.7.0
azure-keyvault-keys==4.8.0
azure-keyvault-secrets==4.7.0
azure-mgmt-advisor==9.0.0
azure-mgmt-apimanagement==1.0.0
azure-mgmt-applicationinsights==1.0.0
azure-mgmt-authorization==1.0.0
azure-mgmt-batch==15.0.0
azure-mgmt-cdn==10.0.0
azure-mgmt-cognitiveservices==11.0.0
azure-mgmt-compute==19.0.0
azure-mgmt-containerinstance==7.0.0
azure-mgmt-containerregistry==8.0.0b1
azure-mgmt-containerservice==15.1.0
azure-mgmt-core==1.4.0
azure-mgmt-cosmosdb==6.4.0
azure-mgmt-costmanagement==1.0.0
azure-mgmt-databricks==1.0.0b1
azure-mgmt-datafactory==1.1.0
azure-mgmt-datalake-nspkg==3.0.1
azure-mgmt-datalake-store==0.5.0
azure-mgmt-dns==8.0.0b1
azure-mgmt-eventgrid==8.0.0
azure-mgmt-eventhub==8.0.0
azure-mgmt-frontdoor==1.0.1
azure-mgmt-hdinsight==7.0.0
azure-mgmt-iothub==1.0.0
azure-mgmt-keyvault==8.0.0
azure-mgmt-logic==9.0.0
azure-mgmt-managementgroups==1.0.0b1
azure-mgmt-monitor==2.0.0
azure-mgmt-msi==1.0.0
azure-mgmt-network==17.1.0
azure-mgmt-nspkg==3.0.2
azure-mgmt-policyinsights==1.0.0
azure-mgmt-rdbms==8.1.0
azure-mgmt-redis==12.0.0
azure-mgmt-resource==16.1.0
azure-mgmt-resourcegraph==7.0.0
azure-mgmt-search==8.0.0
azure-mgmt-security==1.0.0
azure-mgmt-servicefabric==1.0.0
azure-mgmt-sql==1.0.0
azure-mgmt-storage==17.1.0
azure-mgmt-subscription==1.0.0
azure-mgmt-trafficmanager==0.51.0
azure-mgmt-web==2.0.0
azure-nspkg==3.0.2
azure-storage-blob==12.15.0
azure-storage-common==2.1.0
azure-storage-file==2.1.0
azure-storage-file-share==12.11.1
azure-storage-queue==12.6.0
backports-zoneinfo==0.2.1
backports.zoneinfo==0.2.1
boto3==1.26.109
botocore==1.29.109
c7n==0.9.26
cachetools==5.2.1
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
cryptography==40.0.1
distlib==0.3.6
docutils==0.18.1
google-api-core==2.10.2
google-api-python-client==2.73.0
google-auth==2.16.0
google-auth-httplib2==0.1.0
google-cloud-appengine-logging==1.1.6
google-cloud-audit-log==0.2.5
google-cloud-core==2.3.2
google-cloud-logging==3.4.0
google-cloud-monitoring==2.14.0
google-cloud-storage==1.44.0
google-crc32c==1.5.0
google-resumable-media==2.4.0
googleapis-common-protos==1.58.0
grpc-google-iam-v1==0.12.6
grpcio==1.49.1
grpcio-status==1.49.1
httplib2==0.21.0
idna==3.4
importlib-metadata==5.2.0
importlib-resources==5.12.0
isodate==0.6.1
jmespath==1.0.1
jsonschema==4.17.3
msal==1.21.0
msal-extensions==1.0.0
msrest==0.7.1
msrestazure==0.6.4
netaddr==0.7.20
oauthlib==3.2.2
pkgutil-resolve-name==1.3.10
portalocker==2.7.0
proto-plus==1.22.2
protobuf==4.21.12
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pyjwt==2.6.0
pyparsing==3.0.9
pyrate-limiter==2.8.5
pyrsistent==0.19.3
python-dateutil==2.8.2
pytz==2023.3
pytz-deprecation-shim==0.1.0.post0
pyyaml==6.0
requests==2.28.2
requests-oauthlib==1.3.1
retrying==1.3.4
rsa==4.9
s3transfer==0.6.0
setuptools==67.6.1
six==1.16.0
tabulate==0.9.0
typing-extensions==4.5.0
tzdata==2023.3
tzlocal==4.3
uritemplate==4.1.1
urllib3==1.26.15
zipp==3.15.0
```


### Policy

_No response_

### Relevant log/traceback output

_No response_

### Extra information or context

_No response_


Discussion:

Resolving patch:
diff --git a/c7n/resources/asg.py b/c7n/resources/asg.py
--- a/c7n/resources/asg.py
+++ b/c7n/resources/asg.py
@@ -1403,7 +1403,7 @@ def process_asg(self, asg):
              'PropagateAtLaunch': propagate,
              'Key': destination_tag,
              'Value': source['Value']}])
-        if propagate:
+        if propagate and asg['Instances']:
             self.propagate_instance_tag(source, destination_tag, asg)
 
     def propagate_instance_tag(self, source, destination_tag, asg):


Test patch: