> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GCP Cloud Query

## Background[​](#background "Direct link to Background")

The *Run GCP Cloud Query* Action performs [Steampipe queries](https://hub.steampipe.io/plugins/turbot/gcp) on GCP resources with a powerful and simple PostgreSQL syntax.

For example, a complicated action such as listing disks that are not in use in GCP can be done simply:

```
select  name,  id,  usersfrom  gcp_compute_diskwhere  users is null;
```

To list disks encrypted with Google-managed key:

```
select  name,  id,  zone_name,  disk_encryption_key_typefrom  gcp_compute_diskwhere  disk_encryption_key_type = 'Google managed';
```

A query that fetches a list of GCP S3 buckets with disabled logging looks like this:

```
select  name,  retention_policy ->> 'retentionPeriod' as retention_periodfrom  gcp_storage_bucketwhere  retention_policy ->> 'retentionPeriod' < 604800 :: text;
```

A full description of all existing tables and official examples are provided here:

* [The Official GCP Plugin Documentation](https://hub.steampipe.io/plugins/turbot/gcp/tables)
* [The Blink Automation Library](https://library.blinkops.com/workflows?vendors=GCP\&level=basic)

<Info>
  Blink supports this Steampipe version: v0.32.0.
</Info>

## Action Parameters[​](#action-parameters "Direct link to Action Parameters")

| Parameter     | Description                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------- |
| SQL statement | The SQL query to execute against database resources. Use standard SQL syntax.               |
| Output format | The representation of the output result. The possible options are "Table", "CSV" or "JSON". |

<img src="https://mintcdn.com/blinkops-2/deay2AiePWJDKGEh/img/Actions/Steampipe/RunGCPCloudQuery.png?fit=max&auto=format&n=deay2AiePWJDKGEh&q=85&s=832ca75d468d93c6d3db10286051ed18" alt="RunAWSCloudQuery" width="888" height="395" data-path="img/Actions/Steampipe/RunGCPCloudQuery.png" />
