docs/en/integrations/cloudloggingadmin/source.md
The Cloud Logging Admin source provides a client to interact with the Google Cloud Logging API. This allows tools to list log names, monitored resource types, and query log entries.
Authentication can be handled in two ways:
useClientOAuth is set to true, the source will
expect an OAuth 2.0 access token to be provided by the client (e.g., a web
browser) for each request.{{< list-tools >}}
Initialize a Cloud Logging Admin source that uses ADC:
kind: source
name: my-cloud-logging
type: cloud-logging-admin
project: my-project-id
Initialize a Cloud Logging Admin source that uses client-side OAuth:
kind: source
name: my-oauth-cloud-logging
type: cloud-logging-admin
project: my-project-id
useClientOAuth: true
Initialize a Cloud Logging Admin source that uses service account impersonation:
kind: source
name: my-impersonated-cloud-logging
type: cloud-logging-admin
project: my-project-id
impersonateServiceAccount: "[email protected]"
| field | type | required | description |
|---|---|---|---|
| type | string | true | Must be "cloud-logging-admin". |
| project | string | true | ID of the GCP project. |
| useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to false. Cannot be used with impersonateServiceAccount. |
| impersonateServiceAccount | string | false | The service account to impersonate for API calls. Cannot be used with useClientOAuth. |