Skip to content

metalcloud-cli server-cleanup-policy get

Get detailed information about a specific server cleanup policy

Get detailed information about a specific server cleanup policy by its ID.

This command retrieves and displays comprehensive information about a server cleanup policy including its configuration, schedule, retention settings, and associated maintenance actions.

Arguments: policy-id The unique identifier of the server cleanup policy to retrieve. This can be either the numeric ID or the policy name.

Output Format: By default, output is formatted as a detailed table. Use global flags to change output format: —format=json JSON output (recommended for programmatic use) —format=yaml YAML output —format=csv CSV output (limited detail)

Required Permissions:

  • server_cleanup_policies:read

Examples:

metalcloud-cli server-cleanup-policy get 12345

metalcloud-cli server-cleanup-policy get “weekly-maintenance”

metalcloud-cli scp get 12345 —format=json

metalcloud-cli srv-cp show policy-name

metalcloud-cli server-cleanup-policy get <policy-id> [flags]
-h, --help help for get
-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")

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

Section titled “Auto generated by spf13/cobra on 11-Aug-2025”