metalcloud-cli firmware-policy create

Create a new firmware upgrade policy

Synopsis

Create a new firmware upgrade policy with the specified configuration.

This command creates a new firmware policy that defines rules for automatically upgrading server firmware. The policy configuration must be provided via JSON input that specifies the policy label, action, rules, and optionally associated server instance groups.

Required flags: –config-source Source of the firmware policy configuration Values: ‘pipe’ (read from stdin) or path to JSON file

The configuration JSON should include:

  • label: A descriptive name for the policy

  • action: The upgrade action (e.g., “upgrade”, “downgrade”)

  • rules: Array of rules defining which servers the policy applies to

  • userIdOwner: (optional) User ID of the policy owner

  • serverInstanceGroupIds: (optional) Array of server instance group IDs

Examples:

Create policy from JSON file

metalcloud-cli firmware-policy create –config-source policy.json

Create policy from stdin

echo ‘{“label”:”test-policy”,”action”:”upgrade”}’ | metalcloud-cli fw-policy create –config-source pipe

Get configuration example first

metalcloud-cli firmware-policy config-example > policy.json metalcloud-cli firmware-policy create –config-source policy.json

metalcloud-cli firmware-policy create [flags]

Options

      --config-source string   Source of the new firmware policy configuration. Can be 'pipe' or path to a JSON file.
  -h, --help                   help for create

Options inherited from parent commands

  -k, --api_key string         MetalCloud API key
  -c, --config string          Config file path
  -d, --debug                  Set to enable debug logging
  -e, --endpoint string        MetalCloud API endpoint
  -f, --format string          Output format. Supported values are 'text','csv','md','json','yaml'. (default "text")
  -i, --insecure_skip_verify   Set to allow insecure transport
  -l, --log_file string        Log file path
  -v, --verbosity string       Log level verbosity (default "INFO")

SEE ALSO

Auto generated by spf13/cobra on 11-Aug-2025