I am using C# Google SDK to fetch the list of public ubuntu or debian VM Images available in Google Cloud. The response is a long list of VM' having primarily the deprecated State as "OBSOLETE".
When applying the filter for ACTIVE state the response is null , Can anyone help on how to fetch the active images, or if the result returned without filter is correct.
Scenario 1 . When no filter is applied
var lstRequest = new ImagesResource.ListRequest(_computeClient, ""); var images = lstRequest.Execute();
Sample Response
{ "id": "projects/windows-cloud/global/images", "items": [ { "archiveSizeBytes": 77493158912, "creationTimestamp": "2017-11-06T11:38:00.859-08:00", "deprecated": { "deleted": null, "deprecated": null, "obsolete": null, "replacement": null, "state": "OBSOLETE", "ETag": null }, "description": "Microsoft, Windows Server, version 1709 Core for Containers (Beta), Server Core, x64 built on 2017-10-30", "diskSizeGb": 32, "family": "windows-1709-core-for-containers", "guestOsFeatures": [ { "type": "MULTI_IP_SUBNET", "ETag": null }, { "type": "VIRTIO_SCSI_MULTIQUEUE", "ETag": null }, { "type": "WINDOWS", "ETag": null } ], "id": 7068044754301027575, "imageEncryptionKey": null, "kind": "compute#image", "labelFingerprint": "42WmSpB8rSM=", "labels": null, "licenseCodes": [ 5194306116883728686, 1000226, 2643967004807329741 ], "licenses": [ "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-1709-dc", "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core", "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-for-containers" ], "name": "windows-server-1709-dc-core-for-containers-v20171030", "rawDisk": { "containerType": "TAR", "sha1Checksum": null, "source": "" }, "selfLink": "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/images/windows-server-1709-dc-core-for-containers-v20171030", "shieldedInstanceInitialState": null, "sourceDisk": null, "sourceDiskEncryptionKey": null, "sourceDiskId": null, "sourceImage": null, "sourceImageEncryptionKey": null, "sourceImageId": null, "sourceSnapshot": null, "sourceSnapshotEncryptionKey": null, "sourceSnapshotId": null, "sourceType": "RAW", "status": "READY", "storageLocations": [ "us", "us", "eu", "asia", "asia", "eu", "asia", "us", "us", "us", "asia", "asia", "eu" ], "ETag": null }, { "archiveSizeBytes": 79706428672, "creationTimestamp": "2017-11-16T12:14:33.128-08:00", "deprecated": { "deleted": null, "deprecated": null, "obsolete": null, "replacement": null, "state": "OBSOLETE", "ETag": null }, "description": "Microsoft, Windows Server, version 1709 Core for Containers (Beta), Server Core, x64 built on 2017-11-14", "diskSizeGb": 32, "family": "windows-1709-core-for-containers", "guestOsFeatures": [ { "type": "MULTI_IP_SUBNET", "ETag": null }, { "type": "VIRTIO_SCSI_MULTIQUEUE", "ETag": null }, { "type": "WINDOWS", "ETag": null } ], "id": 1572352838839848774, "imageEncryptionKey": null, "kind": "compute#image", "labelFingerprint": "42WmSpB8rSM=", "labels": null, "licenseCodes": [ 5194306116883728686, 1000226, 2643967004807329741 ], "licenses": [ "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-1709-dc", "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-server-core", "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/licenses/windows-for-containers" ], "name": "windows-server-1709-dc-core-for-containers-v20171114", "rawDisk": { "containerType": "TAR", "sha1Checksum": null, "source": "" }, "selfLink": "https://www.googleapis.com/compute/v1/projects/windows-cloud/global/images/windows-server-1709-dc-core-for-containers-v20171114", "shieldedInstanceInitialState": null, "sourceDisk": null, "sourceDiskEncryptionKey": null, "sourceDiskId": null, "sourceImage": null, "sourceImageEncryptionKey": null, "sourceImageId": null, "sourceSnapshot": null, "sourceSnapshotEncryptionKey": null, "sourceSnapshotId": null, "sourceType": "RAW", "status": "READY", "storageLocations": [ "us", "us", "asia", "asia", "eu", "asia", "asia", "us", "asia", "us", "us", "eu", "eu" ], "ETag": null },
============================================================
Scenario 2: On applying filters
var lstRequest = new ImagesResource.ListRequest(_computeClient, "ubuntu-os-cloud"); lstRequest.Filter = "deprecated.state=ACTIVE"; var images = lstRequest.Execute();
Response
Null
I am using Google.Apis.Compute.v1 namespace