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.
- Log Service is activated. For more information, see Activate Log Service.
- 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
go get -u github.com/aliyun/aliyun-log-go-sdk