Git Product home page Git Product logo

qingcloud-sdk-java's Introduction

QingCloud SDK for Java

The official QingCloud SDK for the Java programming language.

Getting Started

Preparation

Before your start, please login to QingCloud Console to create a pair of QingCloud API AccessKey.

API AccessKey Example:

qy_access_key_id: QYACCESSKEYIDEXAMPLE
qy_secret_access_key: SECRETACCESSKEY

Installation

Add below dependency in your pom file

<dependency>
    <groupId>com.qingcloud</groupId>
    <artifactId>qingcloud-sdk-java</artifactId>
    <version>1.2.2</version>
</dependency>

For more information, please refer to maven page

Usage

Now you are ready to code. You can read the detailed guides in the list below to have a clear understanding.

Quick start code example

public class InstanceTest {
    private static Logger logger = LoggerFactory.getLogger(InstanceTest.class);

    @Test
    public void testDescribeInstances() {
        EnvContext context = new EnvContext("ACCESS_KEY_ID_EXAMPLE", "SECRET_ACCESS_KEY_EXAMPLE");
        context.setProtocol("https");
        context.setHost("api.qingcloud.com");
        context.setPort("443");
        context.setZone("pek3b");
        context.setApiLang("zh-cn"); // optional, set return message i18n, default to us-en
        InstanceService service = new InstanceService(context);

        InstanceService.DescribeInstancesInput input = new InstanceService.DescribeInstancesInput();
        input.setLimit(1);

        try {
            InstanceService.DescribeInstancesOutput output = service.describeInstances(input);
            for (Types.InstanceModel model : output.getInstanceSet()) {
                System.out.println("==================");
                System.out.println(model.getInstanceID());
                System.out.println(model.getInstanceName());
                System.out.println(model.getImage().getImageID());
                for (Types.NICVxNetModel vxNetModel : model.getVxNets()) {
                    System.out.println("==================");
                    System.out.println(vxNetModel.getVxNetID());
                    System.out.println(vxNetModel.getVxNetType());
                }
            }
        } catch (QCException e) {
            e.printStackTrace();
        }
    }
}

Checkout our releases and change logs for information about the latest features, bug fixes and new ideas.

Reference Documentations

Contributing

This repository was automatically generated, please contribute to Snips instead.

LICENSE

The Apache License (Version 2.0, January 2004).

qingcloud-sdk-java's People

Contributors

sunight avatar xinghelanchen avatar dependabot[bot] avatar qingcloud-cps-robot avatar kyon0304 avatar shiyuwang-qc avatar snyk-bot avatar liu2972505 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.