
Lo strumento universale per API GraphQL e CSPM per AWS, Azure, GCP, K8s e tencent.
CloudGraph è lo strumento open-source universale API GraphQL e Cloud Security Posture Management (CSPM) per AWS, Azure, GCP e K8s. Con CloudGraph ottieni:
Cloud Graph ti permette di Conoscere il tuo cloud in 5 minuti. Costruito e mantenuto con amore dal team ❤️ AutoCloud ❤️
🌐 Sito web
💰 Vieni pagato per costruire provider CloudGraph
** l'utilizzo non implica approvazione
AWS, Azure e GPC hanno fatto un lavoro fantastico nel creare soluzioni che permettono a ingegneri come noi di creare sistemi per alimentare il nostro mondo sempre più interconnesso. Negli ultimi 15 anni, prodotti come EC2, S3, RDS e Lambda hanno cambiato radicalmente il modo in cui pensiamo a computing, storage e database.
Con la proliferazione di Kubernetes e Serverless negli ultimi 5 anni circa, i servizi cloud sono diventati sempre più astratti al di sopra di rack di server fisici. Per gli utenti finali, tutto nel cloud è solo un'API, quindi non abbiamo necessariamente bisogno di sapere come funzionano internamente Lambda Functions o EKS per usarli nella creazione di applicazioni. Con un po' di documentazione, accesso API o console e un tutorial, chiunque può praticamente creare qualsiasi cosa gli serva.
Queste astrazioni hanno portato a miglioramenti enormi nella comodità e nell'ampiezza delle offerte di servizi CSP. Quello che una volta era un processo faticoso, dispendioso in termini di tempo e soggetto a errori per il provisioning di nuovi server, database o filesystem, ora può essere fatto in secondi con un semplice clic di un pulsante o il deployment di IAC. Poiché tutto è solo un'astrazione API, quando un CAP è pronto per introdurre un nuovo "prodotto", deve semplicemente esporre una nuova API - sì, sto ovviamente semplificando un po' :)
Chiunque abbia familiarità con i CSP sa che le API dei servizi sono quasi sempre suddivise in namespace modulari che contengono decine, se non centinaia, di metodi API separati per singole risorse. Ad esempio, il servizio AWS EC2 contiene oltre 500 metodi API diversi, con l'aggiunta occasionale di nuovi. Qualsiasi azienda che costruisce sistemi sostanziali su un CSP probabilmente utilizza molti, molti servizi diversi.
Sebbene sia un capolavoro di architettura data center, questa scelta di centinaia di servizi e opzioni di configurazione pone l'onere della conoscenza su come utilizzare correttamente questi servizi direttamente su di noi ingegneri. Di conseguenza, ci troviamo a dover costantemente rimanere aggiornati e imparare tutte le offerte di servizi o le nuove modifiche. Questo richiede una quantità significativa di tempo ed energia mentale. Come sviluppatori, può essere difficile, dispendioso in termini di tempo e frustrante usare l'AWS CLI per fare 5 diverse chiamate API per descrivere, ad esempio, un cluster AWS ECS, i suoi servizi, definizioni di task, task, definizioni di container, ecc. Ci troviamo spesso persi nella documentazione e a dover usare mezza dozzina di API per ottenere risposte a domande come "Cosa sta esattamente girando in questa VPC?"
Questo significa che AWS, Azure e GCP possono sembrare travolgenti rapidamente anche per architetti cloud esperti. Mentre i CSP sono fantastici nel costruire i servizi reali che alimentano le nostre attività, non sono stati fatti molti progressi nel semplificare l'UX quotidiana dell'interrogazione di questi centinaia di servizi in modo sensato.
Nuove soluzioni come Cloud Control API per AWS hanno tentato di creare un'interfaccia standardizzata per interrogare molti tipi diversi di risorse AWS. Sfortunatamente, l'utilizzo di Cloud Control API è severamente limitato e gli utenti devono ancora sapere come interrogare correttamente i loro dati. Questo significa più tempo speso a leggere documentazione e a capire come funzionano i servizi e come sono correlati tra loro.
Sebbene la modularità delle API CSP sia un buon sistema di organizzazione logica e abbia senso, è un peso per gli utenti finali in termini di sovraccarico cognitivo e curva di apprendimento. Doversi ricordare come funzionano centinaia di servizi in continua evoluzione e come sono collegati porta a una dipendenza dalla caffeina e a tempo sprecato a fare l'investigatore.
Non sarebbe fantastico se noi, ingegneri DevOps/Cloud, avessimo un modo più semplice per estrarre i nostri dati da AWS, Azure, GCP e altri? Uno che rifletta la nostra necessità di interrogare facilmente qualsiasi dato su qualsiasi servizio in qualsiasi account senza dover passare ore sulla documentazione o su stack overflow?
È per questi motivi che abbiamo costruito CloudGraph, l'API GraphQL per tutto il cloud. CloudGraph estrae, normalizza, elabora e arricchisce i tuoi dati cloud, permettendoti di accedere a insight profondi su più provider senza sforzo. Dai un'occhiata al nostro post del blog L'API GraphQL per tutto per saperne di più.
Nota che CloudGraph richiede permessi di SOLA LETTURA per funzionare e quindi non può mai mutare la tua infrastruttura cloud reale. Inoltre, nessuna informazione sul tuo ambiente cloud viene mai inviata o condivisa con CloudGraph, AutoCloud o qualsiasi altra terza parte.
Sotto il cofano, CloudGraph contatta il tuo provider cloud, assorbe tutti i dati di configurazione, li elabora e ne memorizza una copia per te in Dgraph. Espone quindi un endpoint su http://localhost:8997 che ti permette di scrivere query GraphQL sui tuoi dati memorizzati. Queste query non solo ti permettono di fare tutto ciò che faresti con, ad esempio, l'AWS SDK/CLI, ma ti permettono anche di eseguire query molto più potenti. CloudGraph include strumenti di query GraphQL pre-confezionati come GraphQL Playground e Altair, ma puoi anche sentirti libero di usarne di tuoi. Include anche uno strumento di visualizzazione dello schema chiamato Voyager in modo da poter comprendere le relazioni tra le entità.
CloudGraph supporta attualmente AWS, Azure, GCP, K8s e Tencent (ne arriveranno molti altri a breve). CloudGraph necessita di permessi di lettura per poter acquisire i tuoi dati. Per semplificare le cose, puoi utilizzare gli stessi permessi che usiamo internamente quando eseguiamo CloudGraph per alimentare AutoCloud. Ecco le guide di autenticazione e i dettagli su come generare le credenziali per ogni provider (sentiti libero di omettere la configurazione specifica di AutoCloud):
Requisiti di sistema
Ci sono 2 modi per installare la CLI di CloudGraph
Puoi installare CloudGraph usando homebrew con il seguente comando:
brew install cloudgraphdev/tap/cg
Usa questo comando per installare e aggiornare CloudGraph all'ultima versione.```bash npm i -g @cloudgraph/cli
<p align="center">
<a href="https://github.com/cloudgraphdev/cli/raw/main/docs/images/install.gif">
<img alt="install" src="https://raw.githubusercontent.com/cloudgraphdev/cli/main/docs/images/install.gif" width="95%" style="display: block; margin: auto"/>
</a>
</p>
<br/>
Puoi quindi aggiungere i provider che desideri (link ai repository dei provider: [AWS](https://github.com/cloudgraphdev/cloudgraph-provider-aws), [Azure](https://github.com/cloudgraphdev/cloudgraph-provider-azure), [GCP](https://github.com/cloudgraphdev/cloudgraph-provider-gcp), [K8s](https://github.com/cloudgraphdev/cloudgraph-provider-k8s), [Tencent Docs](https://github.com/cloudgraphdev/cloudgraph-provider-tencent)):```bash
cg init aws
cg init azure
cg init gcp
cg init k8s
cg init tencent
Puoi anche aggiungerne quanti ne vuoi tutti in una volta```bash cg init aws azure gcp k8s tencent
E aggiungi i pacchetti di policy di conformità per integrare i tuoi dati con insight immediati sulla sicurezza:```bash
cg policy add gcp-cis-1.2.0
cg policy add azure-cis-1.3.1
cg policy add aws-cis-1.2.0
cg policy add aws-cis-1.3.0
cg policy add aws-cis-1.2.0
cg policy add aws-pci-dss-3.2.1
cg policy add aws-nist-800-53-rev4
Puoi trovare un elenco dei policy pack attualmente supportati nel repository dei Policy Packs
Puoi iniziare con tre semplici comandi:
cg init
1. Questa inizializza la configurazione di CloudGraph. Questo comando ti farà una serie di domande su quali provider stai utilizzando e come desideri configurare CloudGraph.
<p align="center">
<a href="https://github.com/cloudgraphdev/cli/raw/main/docs/images/init.gif">
<img alt="init" src="https://raw.githubusercontent.com/cloudgraphdev/cli/main/docs/images/init.gif" width="95%" style="display: block; margin: auto"/>
</a>
</p>
<br/>
---
<br/>```bash
cg launch
cg launch.Nota che se non vuoi usare questo comando, ad esempio, se vuoi avviare il container Dgraph in modalità interattiva, puoi usare il comando docker qui sotto.```bash docker run -it -p 8995:5080 -p 8996:6080 -p 8997:8080 -p 8998:9080 -p 8999:8000 --label cloudgraph-cli-dgraph-standalone -v ~/dgraph:/dgraph --name dgraph dgraph/standalone:v21.03.1
---
<br/>```bash
cg scan
cg scan; questi sono solitamente causati da problemi di autorizzazione. Detto ciò, se riscontri errori problematici nell'esecuzione di CloudGraph, puoi anteporre CG_DEBUG=5 all'inizio del comando, ad esempio CG_DEBUG=5 cg scan. Questo stamperà i log dettagliati con più informazioni e salverà l'output in cg-debug.log. Condividi i tuoi log con noi aprendo un issue su GitHub o contattandoci nel nostro Slack Workspace.Ecco fatto, sei pronto per iniziare a interrogare i dati! Lo strumento di query che hai selezionato durante il comando cg init verrà aperto nel tuo browser preferito per eseguire query, mutazioni e visualizzazioni su tutta la tua infrastruttura cloud! Nota che se hai installato pacchetti di policy, come AWS CIS 1.2, i dati di approfondimento dei pacchetti di policy verranno aggiunti automaticamente ai tuoi dati cloud!
Nota che puoi anche utilizzare qualsiasi strumento di query GraphQL collegandolo a http://localhost:8997/graphql.
Per arrestare l'istanza Dgraph (fermare il container dgraph) esegui:
```bash
cg teardown
<br /> Inoltre, se desideri rimuovere il contenitore dopo averlo fermato, esegui: <br />```bash
cg teardown --delete-image
CloudGraph conserva tante versioni precedenti dei tuoi dati quante ne hai configurate nel comando cg init. Per caricare e interrogare una versione precedente dei tuoi dati, esegui semplicemente il comando cg load e seleziona la versione dei dati che desideri ispezionare, in questo modo:
Puoi trovare l'elenco dei servizi attualmente supportati per ogni provider nei seguenti repository dei provider:
Link alla documentazione completa: https://docs.cloudgraph.dev/overview.
Per utilizzare CloudGraph, è necessario avere familiarità con GraphQL. Questa sezione contiene alcuni esempi di query per iniziare, ma non è affatto esaustiva. Se riesci a immaginarlo, puoi interrogarlo! Nota che puoi trovare centinaia di ulteriori esempi di query nella documentazione.
Nota: questa sezione si concentrerà su AWS, ma le stesse idee si applicano ad altri provider come Azure e GCP.
Per spiegare come funziona CloudGraph, considera la seguente query che puoi eseguire per ottenere ID e ARN di una singola istanza EC2. Nota che ai fini di questi esempi richiederemo solo gli ID e gli ARN delle risorse AWS per mantenere le cose concise, ma puoi interrogare qualsiasi attributo desideri:
```graphql
query {
getawsEc2(
arn: "arn:aws:ec2:us-east-1:123445678997:instance/i-12345567889012234"
) {
id
arn
}
}
<br />
Questa query restituirà un payload `JSON` simile a questo. Tutti gli esempi seguenti seguiranno lo stesso schema:
<br />```json
{
"data": {
"getawsEc2": {
"id": "i-12345567889012234",
"arn": "arn:aws:ec2:us-east-1:123445678997:instance/i-12345567889012234"
}
},
"extensions": {
"touched_uids": 4
}
}
Ottieni l'ID e l'ARN di ogni EC2 in tutti gli account AWS che hai scansionato:```graphql
query {
queryawsEc2 {
id
arn
}
}
<br />
Ottenere l'`ID` e l'`ARN` di tutte le istanze `EC2` in **uno** dei tuoi account AWS filtrando per l'`accountId`:```graphql
query {
queryawsEc2(filter: { accountId: { eq: "123456" } }) {
id
arn
}
}
Ottieni l'ID e l'ARN di ogni EC2 in "us-east-1" usando una regex per cercare l'ARN:```graphql
query {
queryawsEc2(filter: { arn: { regexp: "/.us-east-1./" } }) {
id
arn
}
}
<br />
Fai la stessa cosa ma controllando che la `region` sia uguale a `"us-east-1"` invece di usare una regex:```graphql
query {
queryawsEc2(filter: { region: { eq: "us-east-1" } }) {
id
arn
}
}
Fai la stessa cosa ma verificando che il region contenga "us-east-1" nel nome invece di usare eq:```graphql
query {
queryawsEc2(filter: { region: { in: "us-east-1" } }) {
id
arn
}
}
<br />
Ottieni l'`ID` e l'`ARN` di ciascuna istanza `EC2` della serie `M5` in `"us-east-1"````graphql
query {
queryawsEc2(
filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
) {
id
arn
}
}
Fai la stessa cosa ma salta il primo risultato trovato (cioè offset: 1) e poi restituisci solo i primi due risultati successivi (cioè first: 2) e ordinali per AZ in ordine crescente (order: { asc: availabilityZone }) in modo che le istanze in "us-east-1a" vengano restituite in cima all'elenco.```graphql
query {
queryawsEc2(
filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
order: { asc: availabilityZone }
first: 2
offset: 1
) {
id
arn
}
}
<br />
Fai la stessa cosa ma includi anche il `EBS Volume` che è il disco di boot per ogni `EC2 instance`:```graphql
query {
queryawsEc2(
filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
order: { asc: availabilityZone }
first: 2
offset: 1
) {
id
arn
ebs(filter: { isBootDisk: true }, first: 1) {
id
arn
isBootDisk
}
}
}
Fai la stessa cosa, ma includi anche i SGs e gli ALBs per ogni EC2. Per gli ALBs, ottieni le EC2 a cui sono collegati insieme all'ID e all'ARN di ogni istanza EC2 trovata (cioè una query circolare).```graphql
query {
queryawsEc2(
filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
order: { asc: availabilityZone }
first: 2
offset: 1
) {
id
arn
ebs(filter: { isBootDisk: true }, first: 1) {
id
arn
isBootDisk
}
securityGroups {
id
arn
}
alb {
id
arn
ec2Instance {
id
arn
}
}
}
}
<br />
Ottieni ogni `VPC`, gli `ALBs` e le `Lambdas` in quel `VPC`, e poi anche un mucchio di sotto-dati annidati. Ottieni anche ogni `S3 Bucket` in `us-east-1`. Ottieni anche la coda `SQS` con un `ARN` di `arn:aws:sqs:us-east-1:8499274828484:autocloud.fifo` e controlla il `approximateNumberOfMessages`. Hai capito l'idea, CloudGraph è **estremamente** potente.```graphql
query {
queryawsVpc {
id
arn
alb {
id
arn
ec2Instance {
id
arn
ebs(filter: { isBootDisk: true }) {
id
arn
}
}
}
lambda {
id
arn
kms {
id
arn
}
}
}
queryawsS3(filter: { region: { eq: "us-east-1" } }) {
id
arn
}
getawsSqs(arn: "arn:aws:sqs:us-east-1:8499274828484:autocloud.fifo") {
approximateNumberOfMessages
}
}
I CloudGraph Policy Pack garantiscono la conformità attraverso l'infrastruttura esistente per un determinato provider cloud. I pack sono basati su insiemi di regole/benchmark forniti da organizzazioni di sicurezza come il Center for Internet Security con l'obiettivo di mantenere la tua infrastruttura aggiornata con gli standard di sicurezza del settore. Una volta aggiunto un policy pack utilizzando il comando cg policy add (ad esempio cg policy add aws-cis-1.2.0), ogni volta che esegui una scansione CloudGraph eseguirà automaticamente le tue policy configurate. I risultati verranno memorizzati in Dgraph e collegati alle tue risorse esistenti, rendendo facile interrogare i risultati di conformità insieme alle tue risorse.
Per maggiori informazioni sui policy pack attualmente disponibili, visita il nostro repository dei Policy Pack
Utilizza il CloudGraph Policy Pack per AWS CIS 1.2 per interrogare tutti i tuoi risultati CIS per tutti i tuoi account AWS:```graphql query { queryawsCISFindings { id resourceId result rule { id description severity } } }
<br />
Se vuoi interrogare diversi risultati di conformità per un determinato provider come AWS contemporaneamente, puoi richiederli in questo modo:```graphql
query {
queryawsFindings {
CISFindings {
id
resourceId
result
rule {
id
description
severity
}
}
AutoCloudFindings {
id
resourceId
result
rule {
id
description
severity
}
}
}
}
Per ogni regola CIS, ottieni le risorse associate alla regola, in questo caso stiamo interrogando i dati degli utenti IAM per vedere quali passano e quali falliscono:```graphql query { queryawsCISFindings { id resourceId result rule { id description severity } iamUser { id arn name } } }
<br />
Se volessi comprendere le regole CIS che si applicano a uno specifico utente IAM, potresti utilizzare la seguente query:```graphql
query {
getawsIamUser(id: "123456789") {
name
CISFindings {
id
resourceId
result
rule {
id
description
severity
}
}
}
}
Anche se non hai installato nessun policy pack, puoi comunque scrivere potenti query di sicurezza come questa per trovare tutti i volumi EBS Volumes non crittografati:```graphql
query {
queryawsEbs(filter: { encrypted: false }) {
id
arn
availabilityZone
encrypted
}
}
<br />
Trova tutti i `S3 Buckets` pubblici:```graphql
query {
queryawsS3(filter: { access: { eq: "Public" } }) {
id
arn
access
}
}
Trova tutti i S3 Buckets che sono pubblici di per sé o che possono avere Objects pubblici al loro interno:```graphql
query {
queryawsS3(filter: { not: { access: { eq: "Private" } } }) {
id
arn
access
}
}
<br />
Trova tutte le chiavi `KMS` in `"us-east-1"`:```graphql
query {
queryawsKms(filter: { arn: { regexp: "/.*us-east-1.*/" } }) {
id
arn
description
keyRotationEnabled
tags {
key
value
}
}
}
Trova tutte le istanze burstabili della serie T:```graphql
query {
queryawsEc2(filter: { instanceType: { regexp: "/^t.*/" } }) {
id
arn
availabilityZone
instanceType
}
}
<br />
Trova i `VPCs` predefiniti:```graphql
query {
queryawsVpc(filter: { defaultVpc: true }) {
id
arn
defaultVpc
state
}
}
Trova i ALBs pubblici:```graphql
query {
queryawsAlb(filter: { scheme: { eq: "internet-facing" } }) {
id
arn
dnsName
createdAt
tags {
key
value
}
}
}
<br />
Trova tutte le `EC2s`, `Lambdas`, e `VPCs` che hanno un valore di `Tag` uguale a `"Production"`:```graphql
query {
queryawsTag(filter: { value: { eq: "Production" } }) {
key
value
ec2Instance {
id
arn
}
lambda {
id
arn
}
vpc {
id
arn
}
}
}
Fai la stessa cosa ma cerca sia una key che un value:```graphql
query {
queryawsTag(
filter: { key: { eq: "Environment" }, value: { eq: "Production" } }
) {
key
value
ec2Instance {
id
arn
}
lambda {
id
arn
}
vpc {
id
arn
}
}
}
<br />
Fai la stessa cosa usando `getawsTag` invece di `queryawsTag`. Nota che quando cerchi tag usando `getawsTag` devi specificare **sia** la `key` che il `value` come `id`, come mostrato sotto con `"Environment:Production"`:```graphql
query {
getawsTag(id: "Environment:Production") {
key
value
ec2Instance {
id
arn
}
lambda {
id
arn
}
vpc {
id
arn
}
}
}
Nota che i dati di fatturazione sono attualmente disponibili solo per AWS. Per importare con successo i dati relativi a FinOps, è necessario abilitare l'API Cost Explorer nel tuo account AWS. Puoi vedere come fare qui
Ottieni il total cost del tuo account AWS per gli last 30 days, il total cost del tuo account AWS month to date, una ripartizione di each service and its cost for the last 30 days e una ripartizione di each service and its cost month to date, oltre ai costi medi monthly e month to date:```graphql
query {
queryawsBilling {
totalCostLast30Days {
cost
currency
formattedCost
}
totalCostMonthToDate {
cost
currency
formattedCost
}
monthToDate {
name
cost
currency
formattedCost
}
last30Days {
name
cost
currency
formattedCost
}
monthToDateDailyAverage {
name
cost
currency
formattedCost
}
last30DaysDailyAverage {
name
cost
currency
formattedCost
}
}
}
<br />
Questa query restituirà un payload `JSON` simile a questo:```json
{
"data": {
"queryawsBilling": [
{
"totalCostLast30Days": {
"cost": 7088.87,
"currency": "USD",
"formattedCost": "$7088.87"
},
"totalCostMonthToDate": {
"cost": 7089.28,
"currency": "USD",
"formattedCost": "$7089.28"
},
"monthToDate": [
{
"name": "Amazon Relational Database Service",
"cost": 548.68,
"currency": "USD",
"formattedCost": "$548.68"
},
{
"name": "Amazon Managed Streaming for Apache Kafka",
"cost": 67.49,
"currency": "USD",
"formattedCost": "$67.49"
},
{
"name": "Amazon OpenSearch Service",
"cost": 1155.04,
"currency": "USD",
"formattedCost": "$1155.04"
}
...More Services
],
"last30Days": [
{
"name": "AWS Step Functions",
"cost": 330.20,
"currency": "USD",
"formattedCost": "$330.20"
},
{
"name": "Amazon Elastic Container Service for Kubernetes",
"cost": 194.40,
"currency": "USD",
"formattedCost": "$194.40"
},
{
"name": "AmazonCloudWatch",
"cost": 310.54,
"currency": "USD",
"formattedCost": "$310.54"
}
...More Services
],
"monthToDateDailyAverage": [
{
"name": "Amazon Relational Database Service",
"cost": 54.86,
"currency": "USD",
"formattedCost": "$54.86"
},
{
"name": "Amazon Managed Streaming for Apache Kafka",
"cost": 6.74,
"currency": "USD",
"formattedCost": "$6.74"
},
{
"name": "Amazon OpenSearch Service",
"cost": 115.50,
"currency": "USD",
"formattedCost": "$115.50"
}
...More Services
],
"last30DaysDailyAverage": [
{
"name": "AWS Step Functions",
"cost": 33.01,
"currency": "USD",
"formattedCost": "$33.01"
},
{
"name": "Amazon Elastic Container Service for Kubernetes",
"cost": 19.44,
"currency": "USD",
"formattedCost": "$19.44"
},
{
"name": "AmazonCloudWatch",
"cost": 31.05,
"currency": "USD",
"formattedCost": "$31.05"
}
...More Services
],
}
]
},
"extensions": {
"touched_uids": 212
}
}
Ottieni ogni EC2 instance nel tuo account AWS insieme al suo costo giornaliero:```graphql
query {
queryawsEc2 {
arn
dailyCost {
cost
currency
formattedCost
}
}
}
<br />
Questa query restituirà un payload `JSON` simile a questo. Tutti gli esempi seguenti faranno lo stesso:```json
{
{
"data": {
"queryawsEc2": [
{
"arn": "arn:aws:ec2:us-east-1:12345678910:instance/i-0c8b3vhfgf8df923f",
"dailyCost": {
"cost": 2.06,
"currency": "USD",
"formattedCost": "$2.06"
}
},
{
"arn": "arn:aws:ec2:us-east-1:12345678910:instance/i-060b3dsfds7sdf62e3",
"dailyCost": {
"cost": 2.06,
"currency": "USD",
"formattedCost": "$2.06"
}
},
...More EC2 Instances
]
},
"extensions": {
"touched_uids": 28
}
}
Ottieni ogni NAT Gateway nel tuo account AWS insieme al suo costo giornaliero:```graphql
query {
queryawsNatGateway {
arn
dailyCost {
cost
currency
formattedCost
}
}
}
<br />
## Esempio AWS CloudWatch:
CloudGraph raccoglie i tuoi dati delle metriche CloudWatch e li archivia insieme a servizi AWS selezionati. Questa funzionalità è attualmente in beta e funzionerà solo per EC2:```graphql
query {
queryawsEc2 {
arn
cloudWatchMetricData {
lastWeek {
cpuUtilizationAverage
networkInAverage
networkOutAverage
networkPacketsInAverage
networkPacketsOutAverage
statusCheckFailedSum
statusCheckFailedInstanceSum
statusCheckFailedSystemSum
diskReadOpsAverage
diskWriteOpsAverage
diskReadBytesAverage
diskWriteBytesAverage
}
lastMonth {
cpuUtilizationAverage
networkInAverage
networkOutAverage
networkPacketsInAverage
networkPacketsOutAverage
statusCheckFailedSum
statusCheckFailedInstanceSum
statusCheckFailedSystemSum
diskReadOpsAverage
diskWriteOpsAverage
diskReadBytesAverage
diskWriteBytesAverage
}
last6Hours {
cpuUtilizationAverage
networkInAverage
networkOutAverage
networkPacketsInAverage
networkPacketsOutAverage
statusCheckFailedSum
statusCheckFailedInstanceSum
statusCheckFailedSystemSum
diskReadOpsAverage
diskWriteOpsAverage
diskReadBytesAverage
diskWriteBytesAverage
}
last24Hours {
cpuUtilizationAverage
networkInAverage
networkOutAverage
networkPacketsInAverage
networkPacketsOutAverage
statusCheckFailedSum
statusCheckFailedInstanceSum
statusCheckFailedSystemSum
diskReadOpsAverage
diskWriteOpsAverage
diskReadBytesAverage
diskWriteBytesAverage
}
}
}
}
Quando pensi "in termini di un grafo", puoi fare quasi tutto con CloudGraph. Ad esempio, supponiamo che tu voglia sapere quali funzioni Lambda non appartengono a una VPC (cioè non sfruttano la rete VPC). Poiché CloudGraph connette tutte le risorse che hanno relazioni, come i genitori VPC con i loro figli Lambda, sei in grado di rispondere facilmente a questa domanda. Basta controllare a quali funzioni Lambda la VPC è "connessa" e confrontarle con l'elenco di tutte le funzioni Lambda in questo modo:
{
# All lambda functions that are NOT in a VPC
lambda (filter: { vpcId: { attributeExists: false } }) {
functionName
vpcId
}
}
``````graphql
query {
queryawsVpc {
id
arn
lambda {
id
arn
}
}
queryawsLambda {
id
arn
}
}
Oggi, la limitazione più grande di CloudGraph e delle nostre capacità di query è che non supportiamo il filtraggio annidato basato su attributi figlio. Quindi, per esempio, per quanto bello sarebbe fare quanto segue, semplicemente non è ancora possibile:
```graphql
query {
queryawsEc2(filter: { ebs: { isBootDisk: true } }) { id arn ebs { id arn } }
queryawsEc2 { id arn ebs(filter: { isBootDisk: true }) { id arn } } }
This è in realtà non una limitazione di CloudGraph, ma una funzionalità che deve ancora essere implementata con Dgraph. [Puoi visualizzare e commentare il thread di discussione qui](https://discuss.dgraph.io/t/proposal-nested-object-filters-for-graphql-rewritten-as-var-blocks-in-dql/12252/2)
<!-- examplesqueriesstop -->
<br />
# Strumenti di Query
<!-- querytools -->
CloudGraph include 2 fantastici strumenti di query e un esploratore dello schema GraphQL. Ricorda, puoi usare **QUALSIASI** strumento di query GraphQL se preferisci un'altra opzione, basta connetterlo al tuo endpoint `/graphql` esposto!
<br />
## [GraphQL Playground](https://github.com/graphql/graphql-playground)
GraphQL Playground ha un'interfaccia utente fluida e coinvolgente, ottima per interrogare uno schema GraphQL in modo rapido e semplice. Ha documentazione generata automaticamente integrata e completamento automatico mentre scrivi. Per accedere a Playground, selezionalo come strumento di query preferito nel comando `init` OPPURE visita `/playground` nel server che CG avvia.
<br />
<p align="center">
<a href="https://github.com/cloudgraphdev/cli/raw/main/docs/images/gqlPlayground.png">
<img alt="gqlPlayground" src="https://raw.githubusercontent.com/cloudgraphdev/cli/main/docs/images/gqlPlayground.png" width="95%" style="display: block; margin: auto"/>
</a>
</p>
<br />
## [Altair](https://github.com/altair-graphql/altair)
Altair è un altro grande strumento di query GraphQL che offre un sacco di [funzionalità](https://github.com/altair-graphql/altair#features) per utenti esperti. Fai cose come completamento automatico delle query, aggiunta dinamica di frammenti ed esportazione/importazione di collezioni di query. Per accedere ad Altair, selezionalo come strumento di query preferito nel comando `init` OPPURE visita `/altair` nel server che CG avvia.
<br />
<p align="center">
<a href="https://github.com/cloudgraphdev/cli/raw/main/docs/images/gqlAltair.png">
<img alt="gqlAltair" src="https://raw.githubusercontent.com/cloudgraphdev/cli/main/docs/images/gqlAltair.png" width="95%" style="display: block; margin: auto"/>
</a>
</p>
<br />
## [Voyager](https://github.com/APIs-guru/graphql-voyager)
GraphQL Voyager è un modo fantastico per esplorare gli schemi dei tuoi provider CG. Ti offre un eccellente grafico bidirezionale contenente tutti i tuoi tipi e query. Puoi cliccare entità o frecce per scoprire connessioni, cercare qualcosa di specifico e ottenere una comprensione più approfondita del tuo schema. Per accedere a Voyager, visita `/voyager` nel server che CG avvia.
<br />
<p align="center">
<a href="https://github.com/cloudgraphdev/cli/raw/main/docs/images/voyager.png">
<img alt="voyager" src="https://raw.githubusercontent.com/cloudgraphdev/cli/main/docs/images/voyager.png" width="95%" style="display: block; margin: auto"/>
</a>
</p>
<!-- querytoolsstop -->
<br />
# Comunità
<br />
Commenti, domande o feedback? Per favore [unisciti al nostro Slack Workspace](https://join.slack.com/t/cloudgraph-workspace/shared_invite/zt-ytjemoz7-yKWwElynDp1eHAAB55sbpg) ci piacerebbe sentirti.
<br />
# Linee guida per i contributi
Se sei interessato a contribuire a CloudGraph, dai un'occhiata alle nostre [Linee guida per i contributi](https://github.com/cloudgraphdev/cli/blob/main/CONTRIBUTING.md).
<br />
# Opzioni di deployment
Puoi eseguire CloudGraph localmente oppure distribuirlo sul tuo provider cloud preferito. I moduli Terraform e le guide per le distribuzioni cloud sono in arrivo!
<br />
# Versione ospitata
Interessato a una versione SaaS completamente gestita/self-hosted di CloudGraph con capacità di visualizzazione 3D integrate, scansioni automatiche e centinaia di controlli di conformità aggiuntivi? Dai un'occhiata ad [AutoCloud](https://www.autocloud.dev) per maggiori dettagli.
<br />
<p align="center">
<a href="https://www.autocloud.dev">
<img alt="autocloud" src="https://raw.githubusercontent.com/cloudgraphdev/cli/main/docs/images/autoCloud.png" width="95%" style="display: block; margin: auto"/>
</a>
</p>
# Debugging
Se incontri errori durante l'esecuzione di CloudGraph, puoi anteporre `CG_DEBUG=5` all'inizio del tuo comando, ad esempio `CG_DEBUG=5 cg scan`. Questo stamperà i log dettagliati con più informazioni che potrai poi utilizzare per aprire un [issue su GitHub](https://github.com/cloudgraphdev/cli/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) o farcelo sapere nel nostro [Slack Workspace](https://join.slack.com/t/cloudgraph-workspace/shared_invite/zt-ytjemoz7-yKWwElynDp1eHAAB55sbpg).
<br />
# Errori comuni
Ci sono alcuni errori comuni che potresti vedere durante l'esecuzione di CloudGraph, solitamente relativi a problemi di permessi o connessione.
- ⚠️ unable to make some connections - Questo avviso nel report di scansione appare quando CG tenta di stabilire una connessione tra due risorse e non ci riesce. Se vedi questo utilizzando uno dei provider ufficialmente supportati da CG, per favore [crea un nuovo issue](https://github.com/cloudgraphdev/cli/issues) così possiamo risolverlo. La causa più comune di questo errore è un bug nella logica di connessione delle risorse del provider sottostante.
- 🚫 unable to store data in Dgraph - Questo errore nel report di scansione appare quando CG tenta di inserire alcuni dati del provider cloud nel database grafico e fallisce. Qualsiasi servizio con questo errore non potrà essere interrogato nello strumento di query GraphQL. Di solito accade quando CG non riesce a ottenere i dati richiesti (come un arn) per una risorsa a causa di un errore durante la chiamata all'SDK del provider, comunemente dovuto a mancanza di autorizzazione.
- Provider {name}@${version} requires cli version {version} but cli version is ${version} - Questo avviso significa che hai versioni incompatibili di CG e del provider che stai cercando di utilizzare. Prova ad aggiornare CG con `npm install -g @cloudgraphdev/cli` e il modulo del provider con `cg provider update` in modo che entrambi siano all'ultima versione. Puoi anche controllare il `pacakge.json` del provider per vedere quali versioni di CG lo supportano.
- Manager failed to install plugin for {provider} - Questo errore si verifica quando il gestore dei plugin di CG non riesce a trovare il modulo del provider che desideri utilizzare. Il gestore cerca il modulo del provider nel registro pubblico NPM. Per i provider ufficialmente supportati, basta passare il nome del provider `CG init aws`. Per i provider supportati dalla community, devi passare anche il namespace `CG init @{providerNamespace}/{provider}`.
<br />
# Comandi
<!-- commands -->
* [`cg help [COMMAND]`](#cg-help-command)
* [`cg init [PROVIDER]`](#cg-init-provider)
* [`cg launch [PROVIDER]`](#cg-launch-provider)
* [`cg load [PROVIDER]`](#cg-load-provider)
* [`cg policy [PROVIDER]`](#cg-policy-provider)
* [`cg policy add [PROVIDER]`](#cg-policy-add-provider)
* [`cg policy install [PROVIDER]`](#cg-policy-install-provider)
* [`cg policy list [PROVIDER]`](#cg-policy-list-provider)
* [`cg policy remove [PROVIDER]`](#cg-policy-remove-provider)
* [`cg policy update [PROVIDER]`](#cg-policy-update-provider)
* [`cg provider [PROVIDER]`](#cg-provider-provider)
* [`cg provider add [PROVIDER]`](#cg-provider-add-provider)
* [`cg provider install [PROVIDER]`](#cg-provider-install-provider)
* [`cg provider list [PROVIDER]`](#cg-provider-list-provider)
* [`cg provider remove [PROVIDER]`](#cg-provider-remove-provider)
* [`cg provider update [PROVIDER]`](#cg-provider-update-provider)
* [`cg scan [PROVIDER]`](#cg-scan-provider)
* [`cg serve [PROVIDER]`](#cg-serve-provider)
* [`cg teardown [PROVIDER]`](#cg-teardown-provider)
* [`cg update [PROVIDER]`](#cg-update-provider)
## `cg help [COMMAND]`
Mostra la guida per cg.```
USAGE
$ cg help [COMMAND] [-n]
ARGUMENTS
COMMAND Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for cg.
Vedi codice: @oclif/plugin-help
cg init [PROVIDER]Imposta la configurazione iniziale per i provider``` USAGE $ cg init [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ] [-r]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -r, --resources -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION Set initial configuration for providers
EXAMPLES $ cg init
$ cg init aws [Initialize AWS provider]
$ cg init aws -r [Specify resources to crawl]
_See code: [src/commands/init.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/init.ts)_
## `cg launch [PROVIDER]`
Avvia un'istanza di Dgraph per memorizzare i dati```
USAGE
$ cg launch [PROVIDER] [--dev] [-d <value>] [-s dgraph] [--directory <value>] [--no-serve] [-p <value>]
[-q playground|altair] [-l <value>] [--use-roles] [-P <value>]
FLAGS
-P, --policies=<value> Policy Packs to execute during scan
-d, --dgraph=<value> Set where dgraph is running (default localhost:8997)
-l, --version-limit=<value> Limit the amount of version folders stored on the filesystem (default 10)
-p, --port=<value> Set port to serve query engine
-q, --query-engine=<option> Query engine to launch
<options: playground|altair>
-s, --storage=<option> Select a storage engine to use. Currently only supports Dgraph
<options: dgraph>
--dev Turn on developer mode
--directory=<value> Set the folder where CloudGraph will store data. (default cg)
--no-serve Set to not serve a query engine
--use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION
Launch an instance of Dgraph to store data
EXAMPLES
$ cg launch
Vedi codice: src/commands/launch.ts
cg load [PROVIDER]Carica una versione specifica dei tuoi dati CloudGraph``` USAGE $ cg load [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION Load a specific version of your CloudGraph data
EXAMPLES $ cg load [Load data for all providers configured]
$ cg load aws [Load data for AWS]
_See code: [src/commands/load.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/load.ts)_
## `cg policy [PROVIDER]`
Comandi per gestire i moduli del pacchetto di policy, esegui $ cg policy per maggiori informazioni.```
USAGE
$ cg policy [PROVIDER] [--dev] [-d <value>] [-s dgraph] [--directory <value>] [--no-serve] [-p <value>]
[-q playground|altair] [-l <value>] [--use-roles] [-P <value>]
FLAGS
-P, --policies=<value> Policy Packs to execute during scan
-d, --dgraph=<value> Set where dgraph is running (default localhost:8997)
-l, --version-limit=<value> Limit the amount of version folders stored on the filesystem (default 10)
-p, --port=<value> Set port to serve query engine
-q, --query-engine=<option> Query engine to launch
<options: playground|altair>
-s, --storage=<option> Select a storage engine to use. Currently only supports Dgraph
<options: dgraph>
--dev Turn on developer mode
--directory=<value> Set the folder where CloudGraph will store data. (default cg)
--no-serve Set to not serve a query engine
--use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION
Commands to manage policy pack modules, run $ cg policy for more info.
Vedi il codice: src/commands/policy/index.ts
cg policy add [PROVIDER]Aggiungi nuovi pacchetti policy``` USAGE $ cg policy add [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-save Set to not alter lock file, just delete plugin --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION Add new policy packs
ALIASES $ cg add policy
EXAMPLES $ cg policy add aws-cis-1.2.0
$ cg policy add [email protected]
## `cg policy install [PROVIDER]`
Installa i policy packs basati sul file di lock```
USAGE
$ cg policy install [PROVIDER] [--no-save] [--dev] [-d <value>] [-s dgraph] [--directory <value>] [--no-serve] [-p
<value>] [-q playground|altair] [-l <value>] [--use-roles] [-P <value>]
FLAGS
-P, --policies=<value> Policy Packs to execute during scan
-d, --dgraph=<value> Set where dgraph is running (default localhost:8997)
-l, --version-limit=<value> Limit the amount of version folders stored on the filesystem (default 10)
-p, --port=<value> Set port to serve query engine
-q, --query-engine=<option> Query engine to launch
<options: playground|altair>
-s, --storage=<option> Select a storage engine to use. Currently only supports Dgraph
<options: dgraph>
--dev Turn on developer mode
--directory=<value> Set the folder where CloudGraph will store data. (default cg)
--no-save Set to not alter lock file, just delete plugin
--no-serve Set to not serve a query engine
--use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION
Install policy packs based on the lock file
ALIASES
$ cg install policy
EXAMPLES
$ cg policy install
cg policy list [PROVIDER]Elenca i pacchetti di policy e le versioni attualmente installati``` USAGE $ cg policy list [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-save Set to not alter lock file, just delete plugin --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION List currently installed policy packs and versions
ALIASES $ cg ls policy $ cg list policy
EXAMPLES $ cg policy list
$ cg policy list aws
## `cg policy remove [PROVIDER]`
Rimuovi il pacchetto di policy attualmente installato```
USAGE
$ cg policy remove [PROVIDER] [--no-save] [--dev] [-d <value>] [-s dgraph] [--directory <value>] [--no-serve] [-p
<value>] [-q playground|altair] [-l <value>] [--use-roles] [-P <value>]
FLAGS
-P, --policies=<value> Policy Packs to execute during scan
-d, --dgraph=<value> Set where dgraph is running (default localhost:8997)
-l, --version-limit=<value> Limit the amount of version folders stored on the filesystem (default 10)
-p, --port=<value> Set port to serve query engine
-q, --query-engine=<option> Query engine to launch
<options: playground|altair>
-s, --storage=<option> Select a storage engine to use. Currently only supports Dgraph
<options: dgraph>
--dev Turn on developer mode
--directory=<value> Set the folder where CloudGraph will store data. (default cg)
--no-save Set to not alter lock file, just delete plugin
--no-serve Set to not serve a query engine
--use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION
Remove currently installed policy pack
ALIASES
$ cg remove policy
$ cg policy remove
$ cg policy rm
$ cg del policy
$ cg rm policy
EXAMPLES
$ cg policy remove
$ cg policy remove aws-cis-1.2.0
$ cg policy remove aws-cis-1.2.0 --no-save
cg policy update [PROVIDER]Aggiorna i pacchetti di policy attualmente installati``` USAGE $ cg policy update [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-save Set to not alter lock file, just delete plugin --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION Update currently installed policy packs
EXAMPLES $ cg policy update
$ cg policy update aws-cis-1.2.0
$ cg policy update [email protected]
## `cg provider [PROVIDER]`
Comandi per gestire i moduli del provider, esegui $ cg provider per maggiori informazioni.```
USAGE
$ cg provider [PROVIDER] [--dev] [-d <value>] [-s dgraph] [--directory <value>] [--no-serve] [-p <value>]
[-q playground|altair] [-l <value>] [--use-roles] [-P <value>]
FLAGS
-P, --policies=<value> Policy Packs to execute during scan
-d, --dgraph=<value> Set where dgraph is running (default localhost:8997)
-l, --version-limit=<value> Limit the amount of version folders stored on the filesystem (default 10)
-p, --port=<value> Set port to serve query engine
-q, --query-engine=<option> Query engine to launch
<options: playground|altair>
-s, --storage=<option> Select a storage engine to use. Currently only supports Dgraph
<options: dgraph>
--dev Turn on developer mode
--directory=<value> Set the folder where CloudGraph will store data. (default cg)
--no-serve Set to not serve a query engine
--use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION
Commands to manage provider modules, run $ cg provider for more info.
See code: src/commands/provider/index.ts
cg provider add [PROVIDER]Aggiungi nuovi provider``` USAGE $ cg provider add [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-save Set to not alter lock file, just delete plugin --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION Add new providers
ALIASES $ cg add provider
EXAMPLES $ cg provider add aws
$ cg provider add [email protected]
## `cg provider install [PROVIDER]`
Installa i provider basandoti sul file di lock```
USAGE
$ cg provider install [PROVIDER] [--no-save] [--dev] [-d <value>] [-s dgraph] [--directory <value>] [--no-serve] [-p
<value>] [-q playground|altair] [-l <value>] [--use-roles] [-P <value>]
FLAGS
-P, --policies=<value> Policy Packs to execute during scan
-d, --dgraph=<value> Set where dgraph is running (default localhost:8997)
-l, --version-limit=<value> Limit the amount of version folders stored on the filesystem (default 10)
-p, --port=<value> Set port to serve query engine
-q, --query-engine=<option> Query engine to launch
<options: playground|altair>
-s, --storage=<option> Select a storage engine to use. Currently only supports Dgraph
<options: dgraph>
--dev Turn on developer mode
--directory=<value> Set the folder where CloudGraph will store data. (default cg)
--no-save Set to not alter lock file, just delete plugin
--no-serve Set to not serve a query engine
--use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION
Install providers based on the lock file
ALIASES
$ cg install provider
EXAMPLES
$ cg provider install
cg provider list [PROVIDER]Elenca i provider attualmente installati e le versioni``` USAGE $ cg provider list [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-save Set to not alter lock file, just delete plugin --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION List currently installed providers and versions
ALIASES $ cg ls provider $ cg list provider
EXAMPLES $ cg provider list
$ cg provider list aws
## `cg provider remove [PROVIDER]`
Rimuovi il provider attualmente installato```
USAGE
$ cg provider remove [PROVIDER] [--no-save] [--dev] [-d <value>] [-s dgraph] [--directory <value>] [--no-serve] [-p
<value>] [-q playground|altair] [-l <value>] [--use-roles] [-P <value>]
FLAGS
-P, --policies=<value> Policy Packs to execute during scan
-d, --dgraph=<value> Set where dgraph is running (default localhost:8997)
-l, --version-limit=<value> Limit the amount of version folders stored on the filesystem (default 10)
-p, --port=<value> Set port to serve query engine
-q, --query-engine=<option> Query engine to launch
<options: playground|altair>
-s, --storage=<option> Select a storage engine to use. Currently only supports Dgraph
<options: dgraph>
--dev Turn on developer mode
--directory=<value> Set the folder where CloudGraph will store data. (default cg)
--no-save Set to not alter lock file, just delete plugin
--no-serve Set to not serve a query engine
--use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION
Remove currently installed provider
ALIASES
$ cg remove provider
$ cg provider remove
$ cg provider rm
$ cg del provider
$ cg rm provider
EXAMPLES
$ cg provider remove
$ cg provider remove aws
$ cg provider remove aws --no-save
cg provider update [PROVIDER]Aggiorna i provider attualmente installati``` USAGE $ cg provider update [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-save Set to not alter lock file, just delete plugin --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION Update currently installed providers
EXAMPLES $ cg provider update
$ cg provider update aws
$ cg provider update [email protected]
## `cg scan [PROVIDER]`
Scansiona i dati di uno o più provider per essere interrogati tramite Dgraph```
USAGE
$ cg scan [PROVIDER] [--dev] [-d <value>] [-s dgraph] [--directory <value>] [--no-serve] [-p <value>]
[-q playground|altair] [-l <value>] [--use-roles] [-P <value>]
FLAGS
-P, --policies=<value> Policy Packs to execute during scan
-d, --dgraph=<value> Set where dgraph is running (default localhost:8997)
-l, --version-limit=<value> Limit the amount of version folders stored on the filesystem (default 10)
-p, --port=<value> Set port to serve query engine
-q, --query-engine=<option> Query engine to launch
<options: playground|altair>
-s, --storage=<option> Select a storage engine to use. Currently only supports Dgraph
<options: dgraph>
--dev Turn on developer mode
--directory=<value> Set the folder where CloudGraph will store data. (default cg)
--no-serve Set to not serve a query engine
--use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION
Scan one or multiple providers data to be queried through Dgraph
EXAMPLES
$ cg scan
$ cg scan aws
$ cg scan aws --dgraph http://localhost:1000 [Save data in dgraph running on port 1000]
$ cg scan aws --no-serve [Do not start the query engine]
See code: src/commands/scan.ts
cg serve [PROVIDER]Serve uno strumento di query GraphQL per interrogare i tuoi dati CloudGraph.``` USAGE $ cg serve [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION Serve a GraphQL query tool to query your CloudGraph data.
EXAMPLES $ cg serve
_Vedi il codice: [src/commands/serve.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/serve.ts)_
## `cg teardown [PROVIDER]`
Arresta il container Docker di Dgraph.```
USAGE
$ cg teardown [PROVIDER] [--delete-image]
FLAGS
--delete-image Remove dgraph docker image after stopping it
DESCRIPTION
Stops the Dgraph Docker container.
EXAMPLES
$ cg teardown
$ cg teardown --delete-image
See code: src/commands/teardown.ts
cg update [PROVIDER]Aggiorna i plugin attualmente installati.``` USAGE $ cg update [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ] [-q playground|altair] [-l ] [--use-roles] [-P ]
FLAGS -P, --policies= Policy Packs to execute during scan -d, --dgraph= Set where dgraph is running (default localhost:8997) -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10) -p, --port= Set port to serve query engine -q, --query-engine= Query engine to launch <options: playground|altair> -s, --storage= Select a storage engine to use. Currently only supports Dgraph <options: dgraph> --dev Turn on developer mode --directory= Set the folder where CloudGraph will store data. (default cg) --no-save Set to not alter lock file, just delete plugin --no-serve Set to not serve a query engine --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
DESCRIPTION Upgrade currently installed plugins.
ALIASES $ cg update
EXAMPLES $ cg update
_Vedi codice: [src/commands/update.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/update.ts)_
<!-- commandsstop -->