Before you can use Log Service SDK for Go to perform operations on Log Service, you must install Log Service SDK for Go. This topic describes how to install Log Service SDK for Go.

Prerequisites

  • Log Service is activated.
  • An AccessKey pair is created and obtained. An Alibaba Cloud account has permissions to call all API operations. Therefore, security risks may arise if you use the AccessKey pair of an Alibaba Cloud account. We recommend that you log on as a RAM user that has permissions to call API operations or perform routine O&M. For more information, see AccessKey pair.
  • Git and Go are installed. For more information, see Install Git and Install Go.

Install Log Service SDK for Go

Run the following command as an administrator in the command-line interface (CLI) to install Log Service SDK for Go:
go get -u github.com/aliyun/aliyun-log-go-sdk
Note No messages appear during the installation. The installation process requires a few minutes to complete. If the installation fails, run the preceding command again.
If the command is executed and no error is returned, Log Service SDK for Go is installed.

What to do next

Get started with Log Service SDK for Go