This topic describes how to install and update the server operation SDK for Go.

Prerequisites

ApsaraVideo VOD is activated. For more information, see Activate ApsaraVideo VOD.

Environment requirements

Go 1.7 or later is installed. You can visit the official website of Go to download an appropriate version.

Install the SDK

You can install the SDK by running the go get or glide command as needed.

  • Run the go get command to install the SDK. The following sample code provides an example:
    go get -u github.com/aliyun/alibaba-cloud-sdk-go/sdk
    Note
    • No messages appear during the installation. Wait until the installation is complete. If the installation times out, run the command again.
    • If the src/github.com/aliyun/alibaba-cloud-sdk-go/services/vod subfolder is displayed in the folder that stores the GOPATH file, the SDK is installed.
  • Run the glide command to install the SDK. The following sample code provides an example:
    glide get github.com/aliyun/alibaba-cloud-sdk-go

Update the SDK

If new features or new API operations are unavailable in the current SDK, update the SDK to the latest version. For more information, see Install the SDK.

What to do next

After the installation, you need to initialize the SDK. You can initialize the server operation SDK for Go by using an AccessKey pair or a Security Token Service (STS) token. For more information, see Initialization.