def METHOD_NAME(self):
    """Creates a json string based on the object attributes.
    Returns:
        str: json str.
    """
    resource_dict = {
        'id': self.id,
        'creationTimestamp': self.creation_timestamp,
        'name': self.name,
        'description': self.description,
        'instance_urls': self.instance_urls,
        'namedPorts': self.named_ports,
        'network': self.network,
        'region': self.region,
        'size': self.size,
        'subnetwork': self.subnetwork,
        'zone': self.zone}
    # Strip out empty values
    resource_dict = dict((k, v) for k, v in
                         list(resource_dict.items()) if v)
    return json.dumps(resource_dict, sort_keys=True)