createInitScript

Prev Next

Can be used in a VPC environment.

Overview

This creates an initialization script.

Request

Request parameters

Parameter name Required Type Restrictions Description
regionCode No String Region code
You can decide the region in which an initialization script will be created.
regionCode can be obtained through the getRegionList action.
Default: Select the first region of the getRegionList search results
initScriptName No String Min : 3, Max : 30
Only English alphabets, numbers, and "-" can be used and it must start with an English letter.
It must end with an English letter or number.
Initialization script name to be created
Default: NAVER Cloud Platform automatically grants it.
osTypeCode No String OS type code
This determines the OS environment in which the initialization script will be executed.
Options : LNX (LINUX) | WND (WINDOWS)
Default : LNX
initScriptContent Yes String Min : 0, Max : 1024 KBytes Initialization script content
* Scripts, such as Python, Perl, Shell, etc. can be used in Linux.
- However, you need to specify the path of your script in the first line as follows: #!/usr/bin/env python, #!/bin/perl, #!/bin/bash etc.
* Only Visual Basic scripts are available for Windows.
- However, the content of a script must be in English.
initScriptDescription No String Min : 0, Max : 1000 Bytes The description about the initialization script to be created
responseFormatType No String Format type of the response results
Options : xml | json
Default : xml

Response

Response body

Example

Request Example

GET {API_URL}/createInitScript
?regionCode=KR
&initScriptName=test-***
&osTypeCode=LNX=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>