CLI Commands

cnspec providers resources

List the resources available in a provider or show field details for a specific resource.

List all resources available in a provider, or show detailed field information for a specific resource. The schema includes both core and network resources. Use this to explore what you can query with MQL for a given asset type.

List all resources in the AWS provider:

cnspec providers resources aws

List all resources as JSON:

cnspec providers resources aws --json

Show the fields of a specific resource:

cnspec providers resources aws aws.ec2.instance

Show the fields of a specific resource as JSON:

cnspec providers resources aws aws.ec2.instance --json

Options

  -h, --help   help for resources
      --json   Output in JSON format

Options inherited from parent commands

      --api-proxy string        Set the proxy for communications with Mondoo Platform API
      --auto-update             Enable automatic provider installation and update (default true)
      --config string           Set config file path (default $HOME/.config/mondoo/mondoo.yml)
      --log-level string        Set the log level: error, warn, info, debug, trace (default "info")
      --logging-config string   Path to a logging configuration file (YAML or JSON) that selects the log writer, level, and writer-specific options
  -v, --verbose                 Enable verbose output

SEE ALSO

On this page