All Products
Search
Document Center

Object Storage Service:Advanced configurations for OSS SDK for Java

Last Updated:Dec 03, 2024

This topic describes how to configure access credentials and the Java client to ensure secure access to Object Storage Service (OSS) resources and optimize the performance of the Java client.

Configure access credentials

To use OSS SDK for Java to initiate a request, you must configure access credentials. Alibaba Cloud services use access credentials to verify your identity and access permissions. We recommend that you select an appropriate authentication and authorization method based on your actual scenario to ensure data security and access legitimacy. You can use different methods to configure access credentials in different scenarios and properly manage and protect your AccessKey pair. For more information, see Configure access credentials.

Configure the Java client

To use a Java program to perform operations on OSS resources, such as creating or deleting buckets and uploading or downloading objects, you must initialize an OSSClient instance. You can create and configure an OSSClient instance, including configuring parameters such as the network timeout and connection pool size, to meet the requirements of different scenarios. For more information, see Initialization.