当前位置: 首页>>代码示例>>Java>>正文


Java ListAccessKeysRequest类代码示例

本文整理汇总了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;
            }
        }
    }
 
开发者ID:awsdocs,项目名称:aws-doc-sdk-examples,代码行数:38,代码来源:ListAccessKeys.java

示例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);
}
 
开发者ID:awslabs,项目名称:aws-sdk-java-resources,代码行数:9,代码来源:UserImpl.java

示例3: getAccessKeys

import com.amazonaws.services.identitymanagement.model.ListAccessKeysRequest; //导入依赖的package包/类
/**
 * Retrieves the AccessKeys collection referenced by this resource.
 */
AccessKeyCollection getAccessKeys(ListAccessKeysRequest request);
 
开发者ID:awslabs,项目名称:aws-sdk-java-resources,代码行数:5,代码来源:User.java


注:本文中的com.amazonaws.services.identitymanagement.model.ListAccessKeysRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。