-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chiman.jang
committed
Oct 2, 2019
1 parent
920607d
commit 983b74e
Showing
739 changed files
with
119,136 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# maven | ||
target/ | ||
pom.xml.tag | ||
pom.xml.releaseBackup | ||
pom.xml.versionsBackup | ||
pom.xml.next | ||
release.properties | ||
dependency-reduced-pom.xml | ||
buildNumber.properties | ||
.mvn/timing.properties | ||
|
||
|
||
# eclipse | ||
.settings/ | ||
.classpath/ | ||
.project/ | ||
|
||
|
||
# intellj | ||
.idea/ | ||
*.iml | ||
out/ | ||
|
||
|
||
# vertx | ||
.vertx/ | ||
|
||
|
||
# temp | ||
*.class | ||
*.log | ||
logs/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2018 NAVER BUSINESS PLATFORM Corp. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,130 @@ | ||
# ncloud-sdk-java | ||
# ncloud-sdk-java | ||
|
||
ncloud-sdk-java is the official Naver Cloud Platform SDK for the JAVA programming language. | ||
|
||
## Requirements | ||
|
||
Building the API client library requires [Maven](https://maven.apache.org/) to be installed. | ||
|
||
## Installation | ||
|
||
To install the API client library to your local Maven repository, simply execute: | ||
|
||
```shell | ||
mvn install | ||
``` | ||
|
||
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: | ||
|
||
```shell | ||
mvn deploy | ||
``` | ||
|
||
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. | ||
|
||
### Maven users | ||
|
||
Add this dependency to your project's POM: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>com.ncloud</groupId> | ||
<artifactId>ncloud-sdk</artifactId> | ||
<version>1.0.0</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
``` | ||
|
||
### Others | ||
|
||
At first generate the JAR by executing: | ||
|
||
mvn package | ||
|
||
Then manually install the following JARs: | ||
|
||
* sdk/target/sdk-1.0.0-jar-with-dependencies.jar | ||
|
||
## Getting Started | ||
|
||
Please follow the [installation](#installation) instruction and create a credentials properties file. | ||
The path to the configuration file is .ncloud/configure in the HOME directory. | ||
* configure example | ||
``` | ||
ncloud_access_key_id=your-access-key | ||
ncloud_secret_access_key=your-secret-key | ||
``` | ||
|
||
And execute the following Java code: | ||
|
||
```java | ||
import com.ncloud.server.*; | ||
import com.ncloud.server.marshaller.*; | ||
import com.ncloud.server.exception.*; | ||
import com.ncloud.server.model.*; | ||
|
||
public class V2ApiExample { | ||
|
||
public static void main(String[] args) { | ||
ApiClient apiClient = new ApiClient.ApiClientBuilder() | ||
.addMarshaller(JsonMarshaller.getInstance()) | ||
.addMarshaller(XmlMarshaller.getInstance()) | ||
.addMarshaller(FormMarshaller.getInstance()) | ||
.setCredentials(new com.ncloud.sdk.NcloudCredentialsProvider().getCredentials()) | ||
.setLogging(true) | ||
.build(); | ||
|
||
com.ncloud.server.api.V2Api apiInstance = new com.ncloud.server.api.V2Api(apiClient); | ||
AddNasVolumeAccessControlRequest addNasVolumeAccessControlRequest = new AddNasVolumeAccessControlRequest(); // AddNasVolumeAccessControlRequest | addNasVolumeAccessControlRequest | ||
try { | ||
// Handler Successful response | ||
ApiResponse<AddNasVolumeAccessControlResponse> result = apiInstance.addNasVolumeAccessControlGet(addNasVolumeAccessControlRequest); | ||
} catch (ApiException e) { | ||
// Handler Failed response | ||
int statusCode = e.getHttpStatusCode(); | ||
Map<String, List<String>> responseHeaders = e.getHttpHeaders(); | ||
InputStream byteStream = e.getByteStream(); | ||
e.printStackTrace(); | ||
} catch (SdkException e) { | ||
// Handle exceptions that occurred before communication with the server | ||
e.printStackTrace(); | ||
} | ||
} | ||
} | ||
|
||
``` | ||
|
||
## Documentation for individual modules | ||
|
||
| Services | Documentation | | ||
| -------------- | --------------------------------------------------- | | ||
| _Server_ | [**Server**](services/server/README.md) | | ||
| _Loadbalancer_ | [**Loadbalancer**](services/loadbalancer/README.md) | | ||
| _Autoscaling_ | [**Autoscaling**](services/autoscaling/README.md) | | ||
| _Monitoring_ | [**Monitoring**](services/monitoring/README.md) | | ||
| _CDN_ | [**CDN**](services/cdn/README.md) | | ||
| _CloudDB_ | [**CloudDB**](services/clouddb/README.md) | | ||
|
||
### License | ||
|
||
``` | ||
Copyright (c) 2018 NAVER BUSINESS PLATFORM Corp. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.ncloud</groupId> | ||
<artifactId>ncloud-sdk-java</artifactId> | ||
<packaging>pom</packaging> | ||
<name>ncloud-sdk-java</name> | ||
<version>1.0.0</version> | ||
|
||
<modules> | ||
<module>sdk</module> | ||
<module>services/server</module> | ||
<module>services/loadbalancer</module> | ||
<module>services/autoscaling</module> | ||
<module>services/cdn</module> | ||
<module>services/clouddb</module> | ||
<module>services/monitoring</module> | ||
</modules> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<artifactId>ncloud-sdk-java</artifactId> | ||
<groupId>com.ncloud</groupId> | ||
<version>1.0.0</version> | ||
</parent> | ||
|
||
<artifactId>sdk</artifactId> | ||
<packaging>jar</packaging> | ||
<name>sdk</name> | ||
<version>1.0.0</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.ncloud</groupId> | ||
<artifactId>server</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.ncloud</groupId> | ||
<artifactId>loadbalancer</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.ncloud</groupId> | ||
<artifactId>autoscaling</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.ncloud</groupId> | ||
<artifactId>cdn</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.ncloud</groupId> | ||
<artifactId>clouddb</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<version>2.4.1</version> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
|
||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-assembly</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.