code: def get_id(name=None, tags=None, region=None, key=None,
             keyid=None, profile=None, in_states=None, filters=None):
  
      '''
      Given instance properties, return the instance id if it exists.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_ec2.get_id myinstance
  
      '''
      instance_ids = find_instances(name=name, tags=tags, region=region, key=key,
                                    keyid=keyid, profile=profile, in_states=in_states,
                                    filters=filters)
      if instance_ids:
          log.info("Instance ids: %s", " ".join(instance_ids))
          if len(instance_ids) == 1:
              return instance_ids[0]
          else:
              raise CommandExecutionError('Found more than one instance '
                                          'matching the criteria.')
      else:
          log.warning('Could not find instance.')
          return Nonf get_id(name=None, tags=None, region=None, key=None,
             keyid=None, profile=None, in_states=None, filters=None):
  
      '''
      Given instance properties, return the instance id if it exists.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_ec2.get_id myinstance
  
      '''
      instance_ids = find_instances(name=name, tags=tags, region=region, key=key,
                                    keyid=keyid, profile=profile, in_states=in_states,
                                    filters=filters)
      if instance_ids:
          log.info("Instance ids: %s", " ".join(instance_ids))
          if len(instance_ids) == 1:
              return instance_ids[0]
          else:
              raise CommandExecutionError('Found more than one instance '
                                          'matching the criteria.')
      else:
          log.warning('Could not find instance.')
          return None
docs: Given instance properties, return the instance id if it exists.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt myminion boto_ec2.get_id myinstance