Simple Log Service (SLS) provides VPC-specific internal domain names for accessing SLS from within a Virtual Private Cloud (VPC).
VPC-specific internal domain name format
The domain name format is {regionId}-internal.log.aliyuncs.com. These domain names can be accessed only from within a VPC. They cannot be accessed from other environments.
Differences from existing internal domain names
VPC-specific internal domain names use independent network segments. SLS assigns a fixed CIDR block to the virtual IP address (VIP) for the domain name in each region. To access SLS from an on-premises data center or an Elastic Compute Service (ECS) instance in a different region over a private network, connect to the private network in the target region using a service such as Cloud Enterprise Network (CEN), Express Connect, a leased line, or a Virtual Private Network (VPN). Then configure a route to the corresponding CIDR block. The following tables list the CIDR blocks for each region.
China
Region | Region ID | Domain name | Fixed IPv4 CIDR block |
China (Hangzhou) | cn-hangzhou | cn-hangzhou-internal.log.aliyuncs.com | 100.115.4.0/24 |
China (Shanghai) | cn-shanghai | cn-shanghai-internal.log.aliyuncs.com | 100.115.12.0/24 |
China (Qingdao) | cn-qingdao | cn-qingdao-internal.log.aliyuncs.com | 100.115.76.0/24 |
China (Beijing) | cn-beijing | cn-beijing-internal.log.aliyuncs.com | 100.115.44.0/24 |
China (Shenzhen) | cn-shenzhen | cn-shenzhen-internal.log.aliyuncs.com | 100.115.10.0/24 |
China (Heyuan) | cn-heyuan | cn-heyuan-internal.log.aliyuncs.com | 100.115.51.0/24 |
China (Guangzhou) | cn-guangzhou | cn-guangzhou-internal.log.aliyuncs.com | 100.115.49.0/24 |
China (Zhangjiakou) | cn-zhangjiakou | cn-zhangjiakou-internal.log.aliyuncs.com | 100.115.28.0/24 |
China (Hohhot) | cn-huhehaote | cn-huhehaote-internal.log.aliyuncs.com | 100.115.69.0/24 |
China (Ulanqab) | cn-wulanchabu | cn-wulanchabu-internal.log.aliyuncs.com | 100.118.12.0/24 |
China (Chengdu) | cn-chengdu | cn-chengdu-internal.log.aliyuncs.com | 100.115.52.0/24 |
China (Hong Kong) | cn-hongkong | cn-hongkong-internal.log.aliyuncs.com | 100.115.24.0/24 |
Outside China
Region | Region ID | Domain name | Fixed IPv4 CIDR block |
Japan (Tokyo) | ap-northeast-1 | ap-northeast-1-internal.log.aliyuncs.com | 100.115.17.0/24 |
South Korea (Seoul) | ap-northeast-2 | ap-northeast-2-internal.log.aliyuncs.com | 100.115.18.0/24 |
Singapore | ap-southeast-1 | ap-southeast-1-internal.log.aliyuncs.com | 100.115.40.0/24 |
Malaysia (Kuala Lumpur) | ap-southeast-3 | ap-southeast-3-internal.log.aliyuncs.com | 100.115.32.0/24 |
Indonesia (Jakarta) | ap-southeast-5 | ap-southeast-5-internal.log.aliyuncs.com | 100.115.36.0/24 |
Philippines (Manila) | ap-southeast-6 | ap-southeast-6-internal.log.aliyuncs.com | 100.115.34.0/24 |
Thailand (Bangkok) | ap-southeast-7 | ap-southeast-7-internal.log.aliyuncs.com | 100.115.35.0/24 |
UAE (Dubai) | me-east-1 | me-east-1-internal.log.aliyuncs.com | 100.115.57.0/24 |
Germany (Frankfurt) | eu-central-1 | eu-central-1-internal.log.aliyuncs.com | 100.115.80.0/24 |
US (Virginia) | us-east-1 | us-east-1-internal.log.aliyuncs.com | 100.115.86.0/24 |
UK (London) | eu-west-1 | eu-west-1-internal.log.aliyuncs.com | 100.115.84.0/24 |
SAU (Riyadh - Partner Region) | me-central-1 | me-central-1-internal.log.aliyuncs.com | 100.115.56.0/24 |
US (Silicon Valley) | us-west-1 | us-west-1-internal.log.aliyuncs.com | 100.115.87.0/24 |
US (Atlanta) | us-southeast-1 | us-southeast-1-internal.log.aliyuncs.com | 100.115.125.128/25 |
Usage
Replace the endpoint with the VPC-specific domain name. The following code provides an example in Java:
import com.aliyun.openservices.log.Client;
import com.aliyun.openservices.log.http.client.ClientConfiguration;
import com.aliyun.openservices.log.http.signer.SignVersion;
public class Sample {
public static void main(String[] args) throws Exception {
// This example uses the China (Beijing) region. Change the region as needed.
String endpoint = "cn-beijing-internal.log.aliyuncs.com";
// This example obtains the AccessKey ID and AccessKey secret from environment variables.
String accessKeyId = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_ID");
String accessKeySecret = System.getenv("ALIBABA_CLOUD_ACCESS_KEY_SECRET");
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setRegion("cn-beijing");
clientConfiguration.setSignatureVersion(SignVersion.V4);
Client client = new Client(endpoint,
accessKeyId,
accessKeySecret,
clientConfiguration);
}
}