

def add_tag(self, key, value=''):
    "\n        Add a tag to this object.  Tag's are stored by AWS and can be used\n        to organize and filter resources.  Adding a tag involves a round-trip\n        to the EC2 service.\n\n        :type key: str\n        :param key: The key or name of the tag being stored.\n\n        :type value: str\n        :param value: An optional value that can be stored with the tag.\n                      If you want only the tag name and no value, the\n                      value should be the empty string.\n        "
    status = self.connection.create_tags([self.id], {
        key: value,
    })
    if (self.tags is None):
        self.tags = TagSet()
    self.tags[key] = value

dataset/ETHPy150Open darcyliu/storyboard/boto/ec2/ec2object.py TaggedEC2Object.add_tag/original