Documentation Index

Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt

Use this file to discover all available pages before exploring further.

Use CLI

Prev Next

Available in Classic and VPC

This section describes the command structure, option specifications, and output formats of the Ncloud CLI.

Command help

Add help at the end of a command to view available commands and options.

To view the list of top-level commands, run the following:

./ncloud help

To view the subcommands of a top-level command, run the following:

./ncloud vserver help
./ncloud vloadbalancer help

Command Structure

Ncloud CLI uses a multipart structure in the command line. This structure begins with a base call to Ncloud, followed by subcommands that specify the action to be performed for each command. The order in which you specify options in the CLI does not matter.

./ncloud <command> <subcommand> [options]

Specify options

Most values passed to options are strings or numbers. You can also pass values in list or map format.

List format

Values in list format can be passed using spaces ( ), commas (,), or by repeating the option declaration.

./ncloud server getPublicIpInstanceList --publicIpInstanceNoList 573361 571968
./ncloud server getPublicIpInstanceList --publicIpInstanceNoList 573361,571968
./ncloud server getPublicIpInstanceList --publicIpInstanceNoList 573361 --publicIpInstanceNoList 571968

Map format

Strings that do not contain spaces may or may not be contained within quotation marks. However, strings in Map format must be contained within quotation marks. As shown in the following example, Linux, macOS, Unix, and Windows PowerShell can use single quotation marks (') and double quotation marks ("), and Windows Command Prompt uses double quotation marks (").

  • Windows PowerShell, Linux, MacOS, Unix

    ./ncloud loadbalancer createLoadBalancerInstance --loadBalancerName penguin --loadBalancerRuleList 'protocolTypeCode="HTTP",loadBalancerPort="80",serverPort="80",l7HealthCheckPath="/l7check.html",proxyProtocolUseYn="N"'
    
  • Windows Command Prompt

    ncloud loadbalancer createLoadBalancerInstance --loadBalancerName penguin --loadBalancerRuleList "protocolTypeCode='HTTP',loadBalancerPort='80',serverPort='80',l7HealthCheckPath='/l7check.html',proxyProtocolUseYn='N'"
    

Set timeout

You can set the times for read timeout and connection timeout. You can set them in seconds, and the default value is 300 seconds.

./ncloud server getZoneList --read-timeout 10
./ncloud server getZoneList --connect-timeout 5

Output format

Ncloud CLI supports two types of output formats. If the --output option is not used, then the default JSON format will be output. If you want to output to XML, run the following:

./ncloud server getZoneList --output xml