Java 类com.amazonaws.services.identitymanagement.model.ListAccessKeysRequest 实例源码

项目:aws-doc-sdk-examples    文件:ListAccessKeys.java   
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;
            }
        }
    }
项目:aws-sdk-java-resources    文件:UserImpl.java   
@Override
public AccessKeyCollection getAccessKeys(ListAccessKeysRequest request) {
    ResourceCollectionImpl result = resource.getCollection("AccessKeys",
            request);

    if (result == null) return null;
    return new AccessKeyCollectionImpl(result);
}
项目:aws-sdk-java-resources    文件:User.java   
/**
 * Retrieves the AccessKeys collection referenced by this resource.
 */
AccessKeyCollection getAccessKeys(ListAccessKeysRequest request);