日志服务提供VPC专用内网域名,用于VPC内访问日志服务。
VPC专用内网域名格式
域名格式为 {regionId}-internal.log.aliyuncs.com ,只能从VPC内访问,其他环境无法访问。
与现有内网域名的区别
支持独立网段,日志服务为每个地域 VPC专用内网域名VIP 划分了固定地址段,云下机房设备或异地ECS实例希望通过内网访问日志服务时,可通过CEN、高速通道、专线、VPN等连接日志服务所在地域内网网络,配置指向对应地域网段的路由,具体网段如下表所示:
国内
地域 | Region_id | 域名 | ipv4固定网段 |
华东1(杭州) | cn-hangzhou | cn-hangzhou-internal.log.aliyuncs.com | 100.115.4.0/24 |
华东2(上海) | cn-shanghai | cn-shanghai-internal.log.aliyuncs.com | 100.115.12.0/24 |
华北1(青岛) | cn-qingdao | cn-qingdao-internal.log.aliyuncs.com | 100.115.76.0/24 |
华北2(北京) | cn-beijing | cn-beijing-internal.log.aliyuncs.com | 100.115.44.0/24 |
华南1(深圳) | cn-shenzhen | cn-shenzhen-internal.log.aliyuncs.com | 100.115.10.0/24 |
华南2(河源) | cn-heyuan | cn-heyuan-internal.log.aliyuncs.com | 100.115.51.0/24 |
河源专属云汽车合规 | cn-heyuan-acdr-1 | cn-heyuan-acdr-1-internal.log.aliyuncs.com | 100.115.92.0/24 |
华南3(广州) | cn-guangzhou | cn-guangzhou-internal.log.aliyuncs.com | 100.115.49.0/24 |
华北3(张家口) | cn-zhangjiakou | cn-zhangjiakou-internal.log.aliyuncs.com | 100.115.28.0/24 |
华北5(呼和浩特) | cn-huhehaote | cn-huhehaote-internal.log.aliyuncs.com | 100.115.69.0/24 |
华北6(乌兰察布) | cn-wulanchabu | cn-wulanchabu-internal.log.aliyuncs.com | 100.118.12.0/24 |
西南1(成都) | cn-chengdu | cn-chengdu-internal.log.aliyuncs.com | 100.115.52.0/24 |
中国(香港) | cn-hongkong | cn-hongkong-internal.log.aliyuncs.com | 100.115.24.0/24 |
海外
地域 | Region_id | 域名 | ipv4固定网段 |
日本(东京) | ap-northeast-1 | ap-northeast-1-internal.log.aliyuncs.com | 100.115.17.0/24 |
韩国(首尔) | ap-northeast-2 | ap-northeast-2-internal.log.aliyuncs.com | 100.115.18.0/24 |
新加坡 | ap-southeast-1 | ap-southeast-1-internal.log.aliyuncs.com | 100.115.40.0/24 |
马来西亚(吉隆坡) | ap-southeast-3 | ap-southeast-3-internal.log.aliyuncs.com | 100.115.32.0/24 |
印度尼西亚(雅加达) | ap-southeast-5 | ap-southeast-5-internal.log.aliyuncs.com | 100.115.36.0/24 |
菲律宾(马尼拉) | ap-southeast-6 | ap-southeast-6-internal.log.aliyuncs.com | 100.115.34.0/24 |
泰国(曼谷) | ap-southeast-7 | ap-southeast-7-internal.log.aliyuncs.com | 100.115.35.0/24 |
阿联酋(迪拜) | me-east-1 | me-east-1-internal.log.aliyuncs.com | 100.115.57.0/24 |
德国(法兰克福) | eu-central-1 | eu-central-1-internal.log.aliyuncs.com | 100.115.80.0/24 |
美国(弗吉尼亚) | us-east-1 | us-east-1-internal.log.aliyuncs.com | 100.115.86.0/24 |
英国(伦敦) | eu-west-1 | eu-west-1-internal.log.aliyuncs.com | 100.115.84.0/24 |
沙特(利雅得) | me-central-1 | me-central-1-internal.log.aliyuncs.com | 100.115.56.0/24 |
美国(硅谷) | us-west-1 | us-west-1-internal.log.aliyuncs.com | 100.115.87.0/24 |
金融云
地域 | Region_id | 域名 | ipv4固定网段 |
华北2 金融云(邀测) | cn-beijing-finance-1 | cn-beijing-finance-1-internal.log.aliyuncs.com | 100.115.48.0/24 |
华东1 金融云 | cn-hangzhou-finance | cn-hangzhou-finance-internal.log.aliyuncs.com | 100.115.5.0/24 |
华东2 金融云 | cn-shanghai-finance-1 | cn-shanghai-finance-1-internal.log.aliyuncs.com | 100.115.63.0/24 |
华南1 金融云 | cn-shenzhen-finance-1 | cn-shenzhen-finance-1-internal.log.aliyuncs.com | 100.115.71.0/24 |
政务云
地域 | Region_id | 域名 | ipv4固定网段 |
华北2 阿里政务云1 | cn-north-2-gov-1 | cn-north-2-gov-1-internal.log.aliyuncs.com | 100.115.72.0/24 |
如何使用
将endpoint替换为 VPC 专用域名即可,此处以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 {
// 此处以北京为例,其它地域请根据实际情况填写
String endpoint = "cn-beijing-internal.log.aliyuncs.com";
// 本示例从环境变量中获取 AccessKey ID 和 AccessKey Secret。
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);
}
}