metalcloud-cli template-asset update¶
Update an existing template asset with new configuration
Synopsis¶
Update an existing template asset using a configuration file or piped input.
Arguments: template_asset_id: The unique identifier of the template asset to update (required)
Required Flags: –config-source: Source of the template asset configuration updates (required) Can be ‘pipe’ for piped input or path to a JSON file
Configuration Format: The configuration must be in JSON format with the same structure as create: { “templateId”: 123, // Required: ID of the OS template “usage”: “logo”, // Required: Usage type (logo, icon, build_source_image, etc.) “file”: { // Required: File configuration “name”: “updated-example.png”, // Required: File name “mimeType”: “image/png”, // Required: MIME type “checksum”: “new-sha256-hash”, // Optional: File checksum “contentBase64”: “updated-base64-content”, // Optional: Base64 encoded file content “templatingEngine”: false, // Optional: Enable templating (default: false) “url”: “https://example.com/updated-file.png” // Optional: External URL }, “tags”: [“branding”, “updated”] // Optional: Tags for categorization }
Examples:
Update from JSON file¶
metalcloud-cli template-asset update 123 –config-source updated-config.json
Update from pipe¶
echo ‘{“templateId”: 123, “usage”: “icon”, “file”: {“name”: “new-icon.png”, “mimeType”: “image/png”}}’ | metalcloud-cli template-asset update 456 –config-source pipe
Generate example, edit, and update¶
metalcloud-cli template-asset config-example > update-config.json
Edit update-config.json with your new values¶
metalcloud-cli template-asset update 789 –config-source update-config.json
metalcloud-cli template-asset update template_asset_id [flags]
Options¶
--config-source string Source of the template asset configuration updates. Can be 'pipe' or path to a JSON file.
-h, --help help for update
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¶
metalcloud-cli template-asset - Manage template assets for OS templates