首页 > 代码库 > change-resource-tags.sh

change-resource-tags.sh

#!/bin/bashids=$(aws ec2 describe-instances --filter "Name=tag:Project,Values=ERPSystem" "Name=tag:Environment,Values=development" --query ‘Reservations[*].Instances[*].InstanceId‘ --output text)echo "Creating tags"aws ec2 create-tags --resources $ids --tags ‘Key=Version,Value=http://www.mamicode.com/1.1‘"Tags created"

  

change-resource-tags.sh