本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
证书提供者变更
凭证提供者
本节提供的 1.x 和 2.x 版本之间证书提供者类和方法的名称更改的映射。AWS SDK for Java下面还列出了版本 2.x 中开发工具包处理凭证的方式的一些主要差异:
-
在版本 2.x 中,默认凭证提供程序会在加载环境变量之前先加载系统属性。有关更多信息,请参阅使用证书。
-
构造函数方法已被替换为
create
或builder
方法。DefaultCredentialsProvider.create();
-
默认情况下,不再设置异步刷新。您必须使用凭证提供程序的
builder
指定它。ContainerCredentialsProvider provider = ContainerCredentialsProvider.builder() .asyncCredentialUpdateEnabled(true) .build();
-
您可以使用
ProfileCredentialsProvier.builder()
指定自定义配置文件的路径。ProfileCredentialsProvider profile = ProfileCredentialsProvider.builder() .profileFile(ProfileFile.builder().content(Paths.get("myProfileFile.file")).build()) .build();
-
配置文件格式已更改,以更贴近于 AWS CLI。有关详细信息,请参阅《AWS Command Line Interface用户指南》AWS CLI中的配置。
在 1.x 和 2.x 版本之间对应的证书提供者更改
方法名称更改 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1.x | 2.x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
不支持 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
不支持 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
不支持 |
环境变量名称更改 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1.x | 2.x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
系统属性名称更改 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1.x | 2.x | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|