createInitScript
    • PDF

    createInitScript

    • PDF

    Article summary

    Can be used in a VPC environment.

    Overview

    Create an initialization script.

    Request

    Request parameter

    Parameter NameRequired StatusTypeRestrictionsDescription
    regionCodeNoStringRegion Code
    You can decide the region where the initialization script will be created.
    The regionCode can be obtained through the getRegionList action.
    Default: Select the first region of the getRegionList query results.
    initScriptNameNoStringMin : 3, Max : 30
    Only English, numbers, and special characters "-" are allowed, and it must start with English.
    It must end with an alphabet letter or number.
    The name of the initialization script to be created
    Default: Naver Cloud Platform automatically assigns it.
    osTypeCodeNoStringOS type code
    This determines the OS environment in which the initialization script will be executed.
    Options : LNX (LINUX) | WND (WINDOWS)
    Default : LNX
    initScriptContentYesStringMin : 0, Max : 1024 KBytesThe content of the initialization script
    * In the Linux environment, the scripts such as Python, Perl and Shell can be used.
    - However, you must specify the path of the script you want to execute in the form of #!/usr/bin/env python, #!/bin/perl and #!/bin/bash on the first line.
    * In the Windows environment, you can only write the Visual Basic script.
    - However, the script content must be written in English.
    initScriptDescriptionNoStringMin : 0, Max : 1000 BytesThe description about the initialization script to be created
    responseFormatTypeNoStringFormat type for the response result
    Options : xml | json
    Default : xml

    Response

    Response data type

    • InitScriptList type
    InitScriptList extends CommonResponse
    private Integer totalRows;
    private List<InitScript> initScriptList = new ArrayList<>();
    InitScript
    private String initScriptNo;
    private String initScriptName;
    private Date createDate;
    private String initScriptDescription;
    private String initScriptContent;
    private CommonCode osType;

    Example

    Request example

    ncloud vserver createInitScript --regionCode KR --initScriptName test-*** --osTypeCode LNX --initScriptContent "#!/bin/bash"
    

    Response example

    <createInitScriptResponse>
      <requestId></requestId>
      <returnCode>0</returnCode>
      <returnMessage>success</returnMessage>
      <totalRows>1</totalRows>
      <initScriptList>
        <initScript>
          <initScriptNo>***44</initScriptNo>
          <initScriptName>test-***</initScriptName>
          <createDate>2020-08-20T15:03:37+0900</createDate>
          <initScriptDescription></initScriptDescription>
          <initScriptContent>#!/bin/bash</initScriptContent>
          <osType>
            <code>LNX</code>
            <codeName>LINUX</codeName>
          </osType>
        </initScript>
      </initScriptList>
    </createInitScriptResponse>
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.