All Products
Search
Document Center

Simple Log Service:SLS SDK for Java overview

Last Updated:Jun 03, 2026

SLS SDK for Java wraps all SLS API operations for programmatic access from Java applications.

Versions

Select the appropriate version before downloading. SLS SDK for Java is available from Maven Repository and GitHub.

Source

Description

Maven Repository

Download SLS SDK packages and add the required Maven dependencies.

Note

Always use the latest version to avoid known issues.

Alibaba Cloud Simple Log Service SDK for Java.

GitHub

View the source code, release tags, and scenario-specific samples on Alibaba Cloud Simple Log Service SDK releases for Java.

Sample code

The following table lists sample code for common scenarios.

Source code on GitHub

Description

AlertSample.java

Manage alerts.

PullLogsSample.java

Pull log data.

LogProject.java

Create a project.

LoggingSample.java

Update service log configurations for a project.

SavedSearchSample.java

Manage saved searches.

ShardBalanceTool.java

Manage shards.

LogStoreSample.java

Create a Logstore.

LogtailConfigSample.java

Manage Logtail configurations.

MachineGroupSample.java

Manage machine groups.

IndexSample.java

Manage log indexes.

QueryLogsSample.java

Query logs.

PutLogsSample.java

Write logs.

IngestionSample.java

Manage ingest processors.

AliyunODPSSinkSample.java

Manage MaxCompute data shipping jobs.

CreateOSSExport

Manage data shipping jobs.

SignV4Sample.java

Set the signature version to V4.