Skip to content

Commit

Permalink
Merge pull request #178 from stackql/feature/doc-updates
Browse files Browse the repository at this point in the history
google doc updates
  • Loading branch information
jeffreyaven authored Sep 13, 2024
2 parents f759221 + 9197634 commit b4e96d6
Show file tree
Hide file tree
Showing 1,949 changed files with 126,032 additions and 13,801 deletions.
184 changes: 93 additions & 91 deletions docs/google-docs/index.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,100 @@
---
title: google
hide_title: false
hide_table_of_contents: false
keywords:
- google
- stackql
- infrastructure-as-code
- configuration-as-data
- cloud inventory
description: Query, deploy and manage Google Cloud Platform (GCP) infrastructure and resources using SQL
custom_edit_url: null
image: /img/providers/google/stackql-google-provider-featured-image.png
id: google-doc
slug: /providers/google
---
---
title: google
hide_title: false
hide_table_of_contents: false
keywords:
- google
- google cloud platform
- stackql
- infrastructure-as-code
- configuration-as-data
- cloud inventory
description: Query, deploy and manage Google Cloud Platform resources using SQL
custom_edit_url: null
image: /img/providers/google/stackql-google-provider-featured-image.png
id: google-doc
slug: /providers/google

---

import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';

Cloud services from Google.

import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';

Cloud computing services offered by Google.

:::info Provider Summary (v24.06.00236)
:::info Provider Summary (v24.09.00251)

<div class="row">
<div class="providerDocColumn">
<span>total services:&nbsp;<b>163</b></span><br />
<span>total methods:&nbsp;<b>8365</b></span><br />
</div>
<div class="providerDocColumn">
<span>total resources:&nbsp;<b>1706</b></span><br />
<span>total selectable resources:&nbsp;<b>1438</b></span><br />
<span>total services:&nbsp;<b>167</b></span><br />
<span>total resources:&nbsp;<b>0</b></span><br />
</div>
</div>

:::

See also:
[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry)
* * *

## Installation

To pull the latest version of the `google` provider, run the following command:

```bash
REGISTRY PULL google;
```
> To view previous provider versions or to pull a specific provider version, see [here](https://stackql.io/docs/language-spec/registry).
## Authentication


The following authentication methods are supported:
- <CopyableCode code="service_account" />
- <CopyableCode code="interactive" /> for running interactive queries from Cloud Shell or other machines where the user is authenticated using <CopyableCode code="gcloud auth login" />

> for more information on creating service accounts and key files, see [Service accounts overview](https://cloud.google.com/iam/docs/service-account-overview).
### Service Account Environment Variable (default)

The following system environment variable is used by default:

- <CopyableCode code="GOOGLE_CREDENTIALS" /> - contents of the <code>google</code> service account key json file. This variable is sourced at runtime (from the local machine using <code>export GOOGLE_CREDENTIALS=cat creds/my-sa-key.json</code> for example or as a CI variable/secret).

This variable is sourced at runtime (from the local machine using `export GOOGLE_CREDENTIALS=$(cat creds/my-sa-key.json)` for example or as a CI variable/secret).

<details>

<summary>Specifying the service account key file location directly</summary>

You can specify the path to the service account key file without using the default environment variable by using the <CopyableCode code="--auth" /> flag of the <code>stackql</code> program. For example:

```bash
AUTH='{ "google": { "type": "service_account", "credentialsfilepath": "creds/sa-key.json" }}'
stackql shell --auth="${AUTH}"
```

or using PowerShell:

```powershell
$Auth = "{ 'google': { 'type': 'service_account', 'credentialsfilepath': 'creds/sa-key.json' }}"
stackql.exe shell --auth=$Auth
```

</details>

### Interactive Authentication
When you are using Google Cloud Shell or on a machine where you have authenticated using <CopyableCode code="gcloud auth login" />, you can then use the following authentication method:

```bash
AUTH='{ "google": { "type": "interactive" }}'
stackql shell --auth="${AUTH}"
```

or using PowerShell:

```powershell
$Auth = "{ 'google': { 'type': 'interactive' }}"
stackql.exe shell --auth=$Auth
See also:
[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry)
* * *

## Installation

To pull the latest version of the `google` provider, run the following command:

```bash
REGISTRY PULL google;
```
> To view previous provider versions or to pull a specific provider version, see [here](https://stackql.io/docs/language-spec/registry).
## Authentication


The following authentication methods are supported:
- <CopyableCode code="service_account" />
- <CopyableCode code="interactive" /> for running interactive queries from Cloud Shell or other machines where the user is authenticated using <CopyableCode code="gcloud auth login" />

> for more information on creating service accounts and key files, see [Service accounts overview](https://cloud.google.com/iam/docs/service-account-overview).
### Service Account Environment Variable (default)

The following system environment variable is used by default:

- <CopyableCode code="GOOGLE_CREDENTIALS" /> - contents of the <code>google</code> service account key json file. This variable is sourced at runtime (from the local machine using <code>export GOOGLE_CREDENTIALS=cat creds/my-sa-key.json</code> for example or as a CI variable/secret).

This variable is sourced at runtime (from the local machine using `export GOOGLE_CREDENTIALS=$(cat creds/my-sa-key.json)` for example or as a CI variable/secret).

<details>

<summary>Specifying the service account key file location directly</summary>

You can specify the path to the service account key file without using the default environment variable by using the <CopyableCode code="--auth" /> flag of the <code>stackql</code> program. For example:

```bash
AUTH='{ "google": { "type": "service_account", "credentialsfilepath": "creds/sa-key.json" }}'
stackql shell --auth="${AUTH}"
```

or using PowerShell:

```powershell
$Auth = "{ 'google': { 'type': 'service_account', 'credentialsfilepath': 'creds/sa-key.json' }}"
stackql.exe shell --auth=$Auth
```

</details>

### Interactive Authentication
When you are using Google Cloud Shell or on a machine where you have authenticated using <CopyableCode code="gcloud auth login" />, you can then use the following authentication method:

```bash
AUTH='{ "google": { "type": "interactive" }}'
stackql shell --auth="${AUTH}"
```

or using PowerShell:

```powershell
$Auth = "{ 'google': { 'type': 'interactive' }}"
stackql.exe shell --auth=$Auth
```

## Services
Expand All @@ -107,12 +105,14 @@ stackql.exe shell --auth=$Auth
<a href="/providers/google/addressvalidation/">addressvalidation</a><br />
<a href="/providers/google/advisorynotifications/">advisorynotifications</a><br />
<a href="/providers/google/aiplatform/">aiplatform</a><br />
<a href="/providers/google/airquality/">airquality</a><br />
<a href="/providers/google/alloydb/">alloydb</a><br />
<a href="/providers/google/analyticshub/">analyticshub</a><br />
<a href="/providers/google/apigateway/">apigateway</a><br />
<a href="/providers/google/apigee/">apigee</a><br />
<a href="/providers/google/apigeeregistry/">apigeeregistry</a><br />
<a href="/providers/google/apikeys/">apikeys</a><br />
<a href="/providers/google/apim/">apim</a><br />
<a href="/providers/google/appengine/">appengine</a><br />
<a href="/providers/google/apphub/">apphub</a><br />
<a href="/providers/google/artifactregistry/">artifactregistry</a><br />
Expand Down Expand Up @@ -190,6 +190,8 @@ stackql.exe shell --auth=$Auth
<a href="/providers/google/healthcare/">healthcare</a><br />
<a href="/providers/google/iam/">iam</a><br />
<a href="/providers/google/iamcredentials/">iamcredentials</a><br />
<a href="/providers/google/iamv2/">iamv2</a><br />
<a href="/providers/google/iamv2beta/">iamv2beta</a><br />
<a href="/providers/google/iap/">iap</a><br />
<a href="/providers/google/identitytoolkit/">identitytoolkit</a><br />
<a href="/providers/google/ids/">ids</a><br />
Expand Down Expand Up @@ -220,6 +222,7 @@ stackql.exe shell --auth=$Auth
<a href="/providers/google/policyanalyzer/">policyanalyzer</a><br />
<a href="/providers/google/policysimulator/">policysimulator</a><br />
<a href="/providers/google/policytroubleshooter/">policytroubleshooter</a><br />
<a href="/providers/google/pollen/">pollen</a><br />
<a href="/providers/google/privateca/">privateca</a><br />
<a href="/providers/google/prod_tt_sasportal/">prod_tt_sasportal</a><br />
<a href="/providers/google/publicca/">publicca</a><br />
Expand All @@ -244,7 +247,6 @@ stackql.exe shell --auth=$Auth
<a href="/providers/google/servicenetworking/">servicenetworking</a><br />
<a href="/providers/google/serviceusage/">serviceusage</a><br />
<a href="/providers/google/solar/">solar</a><br />
<a href="/providers/google/sourcerepo/">sourcerepo</a><br />
<a href="/providers/google/spanner/">spanner</a><br />
<a href="/providers/google/speech/">speech</a><br />
<a href="/providers/google/sqladmin/">sqladmin</a><br />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

---
title: access_approval_settings
hide_title: false
hide_table_of_contents: false
keywords:
- access_approval_settings
- accessapproval
- google
- google
- stackql
- infrastructure-as-code
- configuration-as-data
Expand All @@ -16,9 +17,10 @@ image: /img/providers/google/stackql-google-provider-featured-image.png
---

import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';



Creates, updates, deletes or gets an <code>access_approval_setting</code> resource or lists <code>access_approval_settings</code> in a region

## Overview
<table><tbody>
Expand All @@ -30,7 +32,7 @@ import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
## Fields
| Name | Datatype | Description |
|:-----|:---------|:------------|
| <CopyableCode code="name" /> | `string` | The resource name of the settings. Format is one of: * "projects/&#123;project&#125;/accessApprovalSettings" * "folders/&#123;folder&#125;/accessApprovalSettings" * "organizations/&#123;organization&#125;/accessApprovalSettings" |
| <CopyableCode code="name" /> | `string` | The resource name of the settings. Format is one of: * "projects/{project}/accessApprovalSettings" * "folders/{folder}/accessApprovalSettings" * "organizations/{organization}/accessApprovalSettings" |
| <CopyableCode code="activeKeyVersion" /> | `string` | The asymmetric crypto key version to use for signing approval requests. Empty active_key_version indicates that a Google-managed key should be used for signing. This property will be ignored if set by an ancestor of this resource, and new non-empty values may not be set. |
| <CopyableCode code="ancestorHasActiveKeyVersion" /> | `boolean` | Output only. This field is read only (not settable via UpdateAccessApprovalSettings method). If the field is true, that indicates that an ancestor of this Project or Folder has set active_key_version (this field will always be unset for the organization since organizations do not have ancestors). |
| <CopyableCode code="enrolledAncestor" /> | `boolean` | Output only. This field is read only (not settable via UpdateAccessApprovalSettings method). If the field is true, that indicates that at least one service is enrolled for Access Approval in one or more ancestors of the Project or Folder (this field will always be unset for the organization since organizations do not have ancestors). |
Expand All @@ -40,7 +42,9 @@ import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
| <CopyableCode code="notificationPubsubTopic" /> | `string` | Optional. A pubsub topic to which notifications relating to approval requests should be sent. |
| <CopyableCode code="preferNoBroadApprovalRequests" /> | `boolean` | This preference is communicated to Google personnel when sending an approval request but can be overridden if necessary. |
| <CopyableCode code="preferredRequestExpirationDays" /> | `integer` | This preference is shared with Google personnel, but can be overridden if said personnel deems necessary. The approver ultimately can set the expiration at approval time. |
| <CopyableCode code="requestScopeMaxWidthPreference" /> | `string` | Optional. A setting to indicate the maximum width of an Access Approval request. |
| <CopyableCode code="requireCustomerVisibleJustification" /> | `boolean` | Optional. A setting to require approval request justifications to be customer visible. |

## Methods
| Name | Accessible by | Required Params | Description |
|:-----|:--------------|:----------------|:------------|
Expand All @@ -50,6 +54,60 @@ import CopyableCode from '@site/src/components/CopyableCode/CopyableCode';
| <CopyableCode code="folders_delete_access_approval_settings" /> | `DELETE` | <CopyableCode code="foldersId" /> | Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited. |
| <CopyableCode code="organizations_delete_access_approval_settings" /> | `DELETE` | <CopyableCode code="organizationsId" /> | Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited. |
| <CopyableCode code="projects_delete_access_approval_settings" /> | `DELETE` | <CopyableCode code="projectsId" /> | Deletes the settings associated with a project, folder, or organization. This will have the effect of disabling Access Approval for the project, folder, or organization, but only if all ancestors also have Access Approval disabled. If Access Approval is enabled at a higher level of the hierarchy, then Access Approval will still be enabled at this level as the settings are inherited. |
| <CopyableCode code="folders_update_access_approval_settings" /> | `EXEC` | <CopyableCode code="foldersId" /> | Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask. |
| <CopyableCode code="organizations_update_access_approval_settings" /> | `EXEC` | <CopyableCode code="organizationsId" /> | Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask. |
| <CopyableCode code="projects_update_access_approval_settings" /> | `EXEC` | <CopyableCode code="projectsId" /> | Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask. |
| <CopyableCode code="folders_update_access_approval_settings" /> | `UPDATE` | <CopyableCode code="foldersId" /> | Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask. |
| <CopyableCode code="organizations_update_access_approval_settings" /> | `UPDATE` | <CopyableCode code="organizationsId" /> | Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask. |
| <CopyableCode code="projects_update_access_approval_settings" /> | `UPDATE` | <CopyableCode code="projectsId" /> | Updates the settings associated with a project, folder, or organization. Settings to update are determined by the value of field_mask. |

## `SELECT` examples

Gets the settings associated with a project, folder, or organization.

```sql
SELECT
name,
activeKeyVersion,
ancestorHasActiveKeyVersion,
enrolledAncestor,
enrolledServices,
invalidKeyVersion,
notificationEmails,
notificationPubsubTopic,
preferNoBroadApprovalRequests,
preferredRequestExpirationDays,
requestScopeMaxWidthPreference,
requireCustomerVisibleJustification
FROM google.accessapproval.access_approval_settings
WHERE foldersId = '{{ foldersId }}';
```

## `UPDATE` example

Updates a access_approval_setting only if the necessary resources are available.

```sql
UPDATE google.accessapproval.access_approval_settings
SET
name = '{{ name }}',
notificationEmails = '{{ notificationEmails }}',
enrolledServices = '{{ enrolledServices }}',
enrolledAncestor = true|false,
activeKeyVersion = '{{ activeKeyVersion }}',
ancestorHasActiveKeyVersion = true|false,
invalidKeyVersion = true|false,
preferredRequestExpirationDays = '{{ preferredRequestExpirationDays }}',
preferNoBroadApprovalRequests = true|false,
notificationPubsubTopic = '{{ notificationPubsubTopic }}',
requireCustomerVisibleJustification = true|false,
requestScopeMaxWidthPreference = '{{ requestScopeMaxWidthPreference }}'
WHERE
foldersId = '{{ foldersId }}';
```

## `DELETE` example

Deletes the specified access_approval_setting resource.

```sql
DELETE FROM google.accessapproval.access_approval_settings
WHERE foldersId = '{{ foldersId }}';
```
Loading

0 comments on commit b4e96d6

Please sign in to comment.