For the complete documentation index, see llms.txt. This page is also available as Markdown.

Example Commands

This guide provides common operation example commands for Zenlayer Cloud CLI to help you quickly get started with managing Zenlayer Cloud resources.

Configuration Examples

1. Configure the CLI

# Interactive configuration
zeno configure

# View current configuration
zeno configure list

# Get a specific configuration value
zeno configure get output

# Set a specific configuration value
zeno configure set output table

2. Using Different Profiles

# Use the prod profile
zeno --profile prod zec describe-instances

# Specify profile using environment variable
export ZENLAYER_PROFILE=dev
zeno zec describe-instances

Cloud Server (ZEC) Examples

1. Create Cloud Server Instances

2. Manage Cloud Server Instances

3. Manage Cloud Server Instance Attributes

Advanced Usage Examples

1. Using Output Formats and Queries

2. Combining with Shell Commands

3. Using Environment Variables

Common Use Cases

Scenario 1: Automated Cloud Server Instance Deployment

Scenario 2: Monitor Bandwidth Usage

Scenario 3: Batch Resource Management

Best Practices

  • Use Profiles: Create profiles for different environments for easy switching

  • Use Output Formats: Choose the appropriate output format based on your needs

  • Use Query Filtering: Use the --query option to filter output and get only the information you need

  • Combine with Shell Commands: Combine CLI commands with shell commands for more complex automation

  • Write Scripts: Write commonly used operations as scripts to improve efficiency

  • Use Environment Variables: Use environment variables to set credentials in CI/CD environments

Last updated

Was this helpful?