metalcloud-cli file-share create
Create a new file share with specified configuration
Synopsis
Section titled “Synopsis”Create a new file share within the specified infrastructure using configuration from a JSON file or pipe input.
This command creates a new file share resource with the specified configuration including storage size, access permissions, and other settings.
Required Arguments: infrastructure_id_or_label The infrastructure ID (numeric) or label to create the file share in
Required Flags: —config-source Source of the new file share configuration Can be ‘pipe’ for stdin input or path to a JSON file
Configuration Format: The configuration should be a JSON object containing file share properties such as:
- name: File share name
- size: Storage size
- type: File share type
- access_mode: Access permissions
- mount_path: Mount path for clients
Examples:
Create a file share from a JSON configuration file
Section titled “Create a file share from a JSON configuration file”metalcloud-cli file-share create my-infrastructure —config-source config.json
Create a file share using pipe input
Section titled “Create a file share using pipe input”echo ’{“name”:“shared-storage”,“size”:“100GB”}’ | metalcloud-cli file-share create my-infrastructure —config-source pipe
Create with infrastructure ID
Section titled “Create with infrastructure ID”metalcloud-cli file-share create 12345 —config-source /path/to/config.json
metalcloud-cli file-share create infrastructure_id_or_label [flags]Options
Section titled “Options” --config-source string Source of the new file share configuration. Can be 'pipe' or path to a JSON file. -h, --help help for createOptions inherited from parent commands
Section titled “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
Section titled “SEE ALSO”- metalcloud-cli file-share - Manage file shares for infrastructure resources