-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(website): Add Gandi source plugin docs (#5198)
Also adds few more real world™️ examples.
- Loading branch information
Showing
6 changed files
with
94 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"overview": "Overview", | ||
"configuration": "Configuration", | ||
"tables": { | ||
"title": "Tables ↗", | ||
"href": "https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/README.md", | ||
"newWindow": true, | ||
"route": "https://github.com/cloudquery/cloudquery/blob/main/plugins/source/gandi/docs/tables/README.md" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Gandi Source Plugin Configuration Reference | ||
|
||
## Example | ||
|
||
This example syncs from Gandi to a Postgres destination, using `api_key` authentication. The (top level) source spec section is described in the [Source Spec Reference](/docs/reference/source-spec). | ||
|
||
```yaml copy | ||
kind: source | ||
# Common source-plugin configuration | ||
spec: | ||
name: gandi | ||
path: cloudquery/gandi | ||
version: "VERSION_SOURCE_GANDI" | ||
tables: ["*"] | ||
destinations: ["postgresql"] | ||
|
||
# Gandi specific configuration | ||
spec: | ||
api_key: "<YOUR_API_KEY_HERE>" | ||
``` | ||
|
||
## Gandi Spec | ||
|
||
This is the (nested) spec used by the Gandi source plugin. | ||
|
||
- `api_key` (string, required): | ||
An API key to access Gandi resources. This can be generated from [Gandi's Account Settings Page](https://account.gandi.net/en/). | ||
|
||
- `sharing_id` (string, optional. Default: not used): | ||
This is your Gandi Organization ID if you wish to limit the queries to a specific Gandi org. | ||
|
||
- `gandi_debug` (bool, optional. Default: false): | ||
Enables verbose logging of HTTP calls made by the [underlying library](https://github.com/go-gandi/go-gandi). | ||
|
||
- `endpoint_url` (string, optional. Default: `https://api.gandi.net`): | ||
Endpoint URL to make the API requests to. To use the [Gandi Sandbox](https://api.sandbox.gandi.net/docs/sandbox/) API endpoint, set this to `https://api.sandbox.gandi.net/`. | ||
|
||
- `timeout_secs` (integer as seconds, optional. Default: `300`): | ||
Default timeout for each API request. Defaults to 5 minutes. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Gandi Plugin | ||
|
||
The CloudQuery Gandi plugin pulls configuration out of Gandi resources and loads it into any supported CloudQuery destination (e.g. PostgreSQL). | ||
|
||
## Authentication | ||
|
||
In order to fetch information from Gandi, `cloudquery` needs to be authenticated. An API key is required for authentication. Get your API key from [Gandi's Account Settings Page](https://account.gandi.net/en/). | ||
|
||
## Query Examples | ||
|
||
### Get list of domains which will expire in 90 days | ||
|
||
```sql | ||
select fqdn, dates->>'registry_ends_at' as registry_ends_at, date_trunc('day', (dates->>'registry_ends_at')::timestamp - current_timestamp) as days_left from gandi_domains where ((dates->>'registry_ends_at')::timestamp - interval '90 day') < current_timestamp order by 1; | ||
``` | ||
|
||
### Get domains in Gandi LiveDNS | ||
|
||
```sql | ||
select fqdn, current, nameservers from gandi_domain_live_dns order by 1; | ||
``` | ||
|
||
### Get list of domain glue records | ||
|
||
```sql | ||
select fqdn, name, ips from gandi_domain_glue_records order by 1, 2; | ||
``` | ||
|
||
### Get list of LiveDNS domains which don't have automatic snapshots enabled | ||
|
||
```sql | ||
select d.fqdn from gandi_livedns_domains d left join gandi_livedns_snapshots s on s.fqdn=d.fqdn and s.automatic where s.fqdn is null; | ||
``` | ||
### Inspect LiveDNS snapshots for a given domain | ||
|
||
```sql | ||
select count(1) as number_of_snapshots, max(created_at) as last_snapshot_at from gandi_livedns_snapshots where fqdn = 'yourdomain.com'; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters