本文整理汇总了Java中com.amazonaws.services.identitymanagement.model.ListAccessKeysRequest类的典型用法代码示例。如果您正苦于以下问题:Java ListAccessKeysRequest类的具体用法?Java ListAccessKeysRequest怎么用?Java ListAccessKeysRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ListAccessKeysRequest类属于com.amazonaws.services.identitymanagement.model包,在下文中一共展示了ListAccessKeysRequest类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import com.amazonaws.services.identitymanagement.model.ListAccessKeysRequest; //导入依赖的package包/类
public static void main(String[] args) {
final String USAGE =
"To run this example, supply an IAM username\n" +
"Ex: ListAccessKeys <username>\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String username = args[0];
final AmazonIdentityManagement iam =
AmazonIdentityManagementClientBuilder.defaultClient();
boolean done = false;
ListAccessKeysRequest request = new ListAccessKeysRequest()
.withUserName(username);
while (!done) {
ListAccessKeysResult response = iam.listAccessKeys(request);
for (AccessKeyMetadata metadata :
response.getAccessKeyMetadata()) {
System.out.format("Retrieved access key %s",
metadata.getAccessKeyId());
}
request.setMarker(response.getMarker());
if (!response.getIsTruncated()) {
done = true;
}
}
}
示例2: getAccessKeys
import com.amazonaws.services.identitymanagement.model.ListAccessKeysRequest; //导入依赖的package包/类
@Override
public AccessKeyCollection getAccessKeys(ListAccessKeysRequest request) {
ResourceCollectionImpl result = resource.getCollection("AccessKeys",
request);
if (result == null) return null;
return new AccessKeyCollectionImpl(result);
}
示例3: getAccessKeys
import com.amazonaws.services.identitymanagement.model.ListAccessKeysRequest; //导入依赖的package包/类
/**
* Retrieves the AccessKeys collection referenced by this resource.
*/
AccessKeyCollection getAccessKeys(ListAccessKeysRequest request);