Skip to content

Latest commit

 

History

History
224 lines (185 loc) · 12.1 KB

File metadata and controls

224 lines (185 loc) · 12.1 KB

vautoscaling

Requirements

Building the API client library requires Maven to be installed.

Installation

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
	<groupId>com.ncloud</groupId>
	<artifactId>vautoscaling</artifactId>
	<version>1.1.0</version>
	<scope>compile</scope>
</dependency>

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/vautoscaling-1.1.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and create a credentials properties file.

type=iam
apiKey=your-api-key
accessKey=your-access-key
secretKey=your-secret-key

And execute the following Java code:

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import com.ncloud.ApiClient;
import com.ncloud.ApiResponse;
import com.ncloud.auth.PropertiesFileCredentialsProvider;
import com.ncloud.exception.ApiException;
import com.ncloud.exception.SdkException;
import com.ncloud.marshaller.FormMarshaller;
import com.ncloud.marshaller.JsonMarshaller;
import com.ncloud.marshaller.XmlMarshaller;
import com.ncloud.vautoscaling.model.*;

public class V2ApiExample {

	public static void main(String[] args) {
		ApiClient apiClient = new ApiClient.ApiClientBuilder()
			.addMarshaller(JsonMarshaller.getInstance())
			.addMarshaller(XmlMarshaller.getInstance())
			.addMarshaller(FormMarshaller.getInstance())
			.setCredentialsProvider(new PropertiesFileCredentialsProvider("your-credentials-properties-file"))
			.setLogging(true)
			.build();

		V2Api apiInstance = new V2Api(apiClient);
		CreateAutoScalingGroupRequest createAutoScalingGroupRequest = new CreateAutoScalingGroupRequest(); // CreateAutoScalingGroupRequest | createAutoScalingGroupRequest
		try {
			// Handler Successful response
			ApiResponse<CreateAutoScalingGroupResponse> result = apiInstance.createAutoScalingGroupGet(createAutoScalingGroupRequest);
		} 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 API Endpoints

All URIs are relative to https://ncloud.apigw.ntruss.com/vautoscaling/v2

Class Method HTTP request Description
V2Api createAutoScalingGroupGet GET /createAutoScalingGroup
V2Api createAutoScalingGroupPost POST /createAutoScalingGroup
V2Api createLaunchConfigurationGet GET /createLaunchConfiguration
V2Api createLaunchConfigurationPost POST /createLaunchConfiguration
V2Api deleteAutoScalingGroupGet GET /deleteAutoScalingGroup
V2Api deleteAutoScalingGroupPost POST /deleteAutoScalingGroup
V2Api deleteLaunchConfigurationGet GET /deleteLaunchConfiguration
V2Api deleteLaunchConfigurationPost POST /deleteLaunchConfiguration
V2Api deleteScalingPolicyGet GET /deleteScalingPolicy
V2Api deleteScalingPolicyPost POST /deleteScalingPolicy
V2Api deleteScheduledActionGet GET /deleteScheduledAction
V2Api deleteScheduledActionPost POST /deleteScheduledAction
V2Api executePolicyGet GET /executePolicy
V2Api executePolicyPost POST /executePolicy
V2Api getAdjustmentTypeListGet GET /getAdjustmentTypeList
V2Api getAdjustmentTypeListPost POST /getAdjustmentTypeList
V2Api getAutoScalingActivityLogListGet GET /getAutoScalingActivityLogList
V2Api getAutoScalingActivityLogListPost POST /getAutoScalingActivityLogList
V2Api getAutoScalingGroupDetailGet GET /getAutoScalingGroupDetail
V2Api getAutoScalingGroupDetailPost POST /getAutoScalingGroupDetail
V2Api getAutoScalingGroupListGet GET /getAutoScalingGroupList
V2Api getAutoScalingGroupListPost POST /getAutoScalingGroupList
V2Api getAutoScalingPolicyListGet GET /getAutoScalingPolicyList
V2Api getAutoScalingPolicyListPost POST /getAutoScalingPolicyList
V2Api getLaunchConfigurationDetailGet GET /getLaunchConfigurationDetail
V2Api getLaunchConfigurationDetailPost POST /getLaunchConfigurationDetail
V2Api getLaunchConfigurationListGet GET /getLaunchConfigurationList
V2Api getLaunchConfigurationListPost POST /getLaunchConfigurationList
V2Api getScalingProcessTypeListGet GET /getScalingProcessTypeList
V2Api getScalingProcessTypeListPost POST /getScalingProcessTypeList
V2Api getScheduledActionListGet GET /getScheduledActionList
V2Api getScheduledActionListPost POST /getScheduledActionList
V2Api putScalingPolicyGet GET /putScalingPolicy
V2Api putScalingPolicyPost POST /putScalingPolicy
V2Api putScheduledUpdateGroupActionGet GET /putScheduledUpdateGroupAction
V2Api putScheduledUpdateGroupActionPost POST /putScheduledUpdateGroupAction
V2Api resumeProcessesGet GET /resumeProcesses
V2Api resumeProcessesPost POST /resumeProcesses
V2Api setDesiredCapacityGet GET /setDesiredCapacity
V2Api setDesiredCapacityPost POST /setDesiredCapacity
V2Api suspendProcessesGet GET /suspendProcesses
V2Api suspendProcessesPost POST /suspendProcesses
V2Api updateAutoScalingGroupGet GET /updateAutoScalingGroup
V2Api updateAutoScalingGroupPost POST /updateAutoScalingGroup

Documentation for Models

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author