Commands
Commands
Exploring the CLI
You can explore the CLI using the help command. Help option can be used on any command:
vgs --helpvgs <COMMAND> --helpAuthentication
Login
Authenticate with your personal VGS account:
vgs loginYou may be asked to allow storing data in your OS key management system (Mac OS Keychain, Linux Secret Service, Windows Credential Vault).
Logout
Sessions automatically expire after 30 minutes of inactivity. You can also log out manually:
vgs logoutService Account
Please check the Service Account page for more info.
Generate
Generate the service account configuration from the vgs-cli template and store it to the service_account.yaml file:
vgs generate service-account -t vgs-cli > service_account.yamlApply
To apply the service account configuration stored in the service_account.yaml file with your organization ID and execute:
vgs apply service-account -O <ORGANIZATION_ID> -f service_account.yamlDelete
To delete the service account, specify your organization ID, service account client ID and execute:
vgs delete service-account -O <ORGANIZATION_ID> <SERVICE_ACCOUNT_CLIENT_ID>Access Credentials
VGS CLI can be used to manage access credentials of the vault.
Generate
Generate a new set of access credentials to the vault
vgs generate access-credentials --vault <VAULT_ID>Get
List all access credentials in the vault
vgs get access-credentials --vault <VAULT_ID>Routes
VGS CLI can be used to manage route configurations of the vault.
Routes Payload Reference
Get
Get details of your routes in YAML format:
vgs get routes --vault <VAULT_ID>data:
- attributes:
created_at: '2021-05-28T11:05:38'
destination_override_endpoint: https://echo.apps.verygood.systems
entries:
- classifiers: {}
config:
condition: AND
expression: null
rules:
- condition: null
expression:
field: PathInfo
operator: matches
type: string
values:
- /post
rules: null
- condition: null
expression:
field: ContentType
operator: equals
type: string
values:
- application/json
rules: null
id: 23573ce5-b72a-4c22-b050-8c6080c82fa7
id_selector: null
operation: REDACT
operations: null
phase: REQUEST
public_token_generator: UUID
targets:
- body
token_manager: PERSISTENT
transformer: JSON_PATH
transformer_config:
- $.account_number
transformer_config_map: null
host_endpoint: (.*).verygoodproxy.com
id: 8613f04f-b4d7-4389-95f6-2f7a3649ea95
ordinal: null
port: 80
protocol: http
source_endpoint: '*'
tags:
name: echo.apps.verygood.systems-rosy-brown-triangle
source: RouteContainer
updated_at: '2021-05-28T11:05:38'
id: 8613f04f-b4d7-4389-95f6-2f7a3649ea95
type: rule_chain
version: 1Please refer to the documentation for more information.
To write route details to a file:
vgs get routes --vault <VAULT_ID> > routes.yamldata:
- attributes:
created_at: '2021-05-28T11:05:38'
destination_override_endpoint: https://echo.apps.verygood.systems
entries:
- classifiers: {}
config:
condition: AND
expression: null
rules:
- condition: null
expression:
field: PathInfo
operator: matches
type: string
values:
- /post
rules: null
- condition: null
expression:
field: ContentType
operator: equals
type: string
values:
- application/json
rules: null
id: 23573ce5-b72a-4c22-b050-8c6080c82fa7
id_selector: null
operation: REDACT
operations: null
phase: REQUEST
public_token_generator: UUID
targets:
- body
token_manager: PERSISTENT
transformer: JSON_PATH
transformer_config:
- $.account_number
transformer_config_map: null
host_endpoint: (.*).verygoodproxy.com
id: 8613f04f-b4d7-4389-95f6-2f7a3649ea95
ordinal: null
port: 80
protocol: http
source_endpoint: '*'
tags:
name: echo.apps.verygood.systems-rosy-brown-triangle
source: RouteContainer
updated_at: '2021-05-28T11:05:38'
id: 8613f04f-b4d7-4389-95f6-2f7a3649ea95
type: rule_chain
version: 1Please refer to the documentation for more information.
Apply
Create or update the route:
vgs apply routes --vault <VAULT_ID> -f routes.yamldata:
- attributes:
created_at: '2021-05-28T11:05:38'
destination_override_endpoint: https://echo.apps.verygood.systems
entries:
- classifiers: {}
config:
condition: AND
expression: null
rules:
- condition: null
expression:
field: PathInfo
operator: matches
type: string
values:
- /post
rules: null
- condition: null
expression:
field: ContentType
operator: equals
type: string
values:
- application/json
rules: null
id: 23573ce5-b72a-4c22-b050-8c6080c82fa7
id_selector: null
operation: REDACT
operations: null
phase: REQUEST
public_token_generator: UUID
targets:
- body
token_manager: PERSISTENT
transformer: JSON_PATH
transformer_config:
- $.account_number
transformer_config_map: null
host_endpoint: (.*).verygoodproxy.com
id: 8613f04f-b4d7-4389-95f6-2f7a3649ea95
ordinal: null
port: 80
protocol: http
source_endpoint: '*'
tags:
name: echo.apps.verygood.systems-rosy-brown-triangle
source: RouteContainer
updated_at: '2021-05-28T11:05:38'
id: 8613f04f-b4d7-4389-95f6-2f7a3649ea95
type: rule_chain
version: 1Please refer to the documentation for more information.
Vaults
Generate
Print an empty template to create a new vault from:
vgs generate vault > vault.yamlapiVersion: 1.0.0
kind: Vault
data:
name: Very Good Vault
environment: SANDBOX
organizationId: AC6mGNNRecR7K5N7AjX5niz4Apply
Create a new vault from a template file:
vgs apply vault -O <ORGANIZATION_ID> -f vault.yamlapiVersion: 1.0.0
kind: Vault
data:
credentials:
password: 7404bf62-20e7-4e38-bb3c-3afd60df89dd
username: USmgjMnPEotPUhKsZEBYR32x
environment: SANDBOX
id: tntmppl73s7
name: Very Good Vault
organizationId: ACq9AiipVS8rnhvQgMZ9Jjr9Make sure to save generated user credentials as they're only shown once.
Get
Get details of your vaults in a YAML format:
vgs get vaultsapiVersion: 1.0.0
kind: Vault
data:
attributes:
environment: SANDBOX
identifier: tntmppl73s7
name: Very Good VaultOrganizations
Get
Get details of your organizations in a YAML format:
vgs get organizationsapiVersion: 1.0.0
kind: Organizations
data:
attributes:
active: true
createdAt: 2021-12-10T16:04:21.946Z
identifier: gix4hve5
name: Very Good Organization
id: ACq9AiipVS8rnhvQgMZ9Jjr9Logs
Access
Print access logs for the vault. Log records are grouped by 30 items by default if --tail option is not specified or larger than 30. Could be fetched up to 1020 rows at a time:
vgs logs access [OPTIONS]Options
--vault, -V
Set target vault to get logs (e.g. tnt23f12a3g).
--since
Print logs newer than a relative duration (e.g. 30s, 5m, or 3h) or after a specific RFC 3339 date.
--until
Print logs older than a relative duration (e.g. 30s, 5m, or 3h) or before a specific RFC 3339 date.
--tail
Set number of records to show from the end of the logs. Defaults to all logs if unspecified.
--output, -o
Define output format. Possible values: json, yaml. Defaults to yaml if unspecified.
Examples
vgs logs access --vault <VAULT_ID> --since 2020-08-01T12:30:45
vgs logs access --vault <VAULT_ID> --since 1h
vgs logs access --vault <VAULT_ID> --until 2020-08-01T12:30:45
vgs logs access --vault <VAULT_ID> --until 8h
vgs logs access --vault <VAULT_ID> --tail 10
vgs logs access --vault <VAULT_ID> --output jsonOperations
Print operation logs for the particular request:
vgs logs operations [OPTIONS]Options
--vault, -V
Set target vault to get logs (e.g. tnt23f12a3g).
--request, -R
Set request id to get logs. (e.g. 3f2ab1258a87bc03f18d41a71cf317ee).
--output, -o
Define output format. Possible values: json, yaml. Defaults to yaml if unspecified.
Examples
vgs logs operations --vault <VAULT_ID> --request <REQUEST_ID>
vgs logs operations --vault <VAULT_ID> --request <REQUEST_ID> --output jsonLast updated

