All Products
Search
Document Center

Simple Log Service:Install Simple Log Service SDK for Go

Last Updated:Oct 26, 2023

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

Prerequisites

  • Simple Log Service is activated. For more information, see Activate Simple Log Service.

  • An AccessKey pair is created and obtained. For more information, see AccessKey pair.

    An Alibaba Cloud account has permissions to call all API operations. If you use the AccessKey pair of an Alibaba Cloud account, security risks may occur. We recommend that you create and use a RAM user to call API operations or perform routine O&M. Make sure that the RAM user is granted the permissions to perform operations on Simple Log Service resources. For more information, see Grant permissions to a RAM user.

  • Git and Go are installed. For more information, see Install Git and Install Go.

Install Simple Log Service SDK for Go

Run the following command as an administrator in the command-line interface (CLI) to install Simple 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, Simple Log Service SDK for Go is installed.

What to do next

Get started with Log Service SDK for Go