Examples of describeInstances()


Examples of com.netflix.simianarmy.client.aws.AWSClient.describeInstances()

        Map<String, AutoScalingInstanceDetails> idToASGInstance = new HashMap<String, AutoScalingInstanceDetails>();
        for (AutoScalingInstanceDetails instanceDetails : awsClient.describeAutoScalingInstances(instanceIds)) {
            idToASGInstance.put(instanceDetails.getInstanceId(), instanceDetails);
        }

        for (Instance instance : awsClient.describeInstances(instanceIds)) {
            Resource instanceResource = new AWSResource().withId(instance.getInstanceId())
                    .withRegion(getAWSClient().region()).withResourceType(AWSResourceType.INSTANCE)
                    .withLaunchTime(instance.getLaunchTime());
            for (Tag tag : instance.getTags()) {
                instanceResource.setTag(tag.getKey(), tag.getValue());
View Full Code Here

Examples of com.netflix.simianarmy.client.aws.AWSClient.describeInstances()

                updateCluster(cluster);
                list.add(cluster);
            }
            //Cluster containing all solo instances
            Set<String> instances = Sets.newHashSet();
            for (com.amazonaws.services.ec2.model.Instance awsInstance : awsClient.describeInstances()) {
                if (!asgInstances.contains(awsInstance.getInstanceId())) {
                    LOGGER.info(String.format("Adding instance %s to soloInstances cluster.",
                            awsInstance.getInstanceId()));
                    instances.add(awsInstance.getInstanceId());
                }
View Full Code Here

Examples of com.netflix.simianarmy.client.aws.AWSClient.describeInstances()

        Map<String, Long> result = Maps.newHashMap();
        if (instanceIds == null || instanceIds.length == 0) {
            return result;
        }
        AWSClient awsClient = new AWSClient(region, awsCredentialsProvider);
        for (Instance instance : awsClient.describeInstances(instanceIds)) {
            if (instance.getLaunchTime() != null) {
                result.put(instance.getInstanceId(), instance.getLaunchTime().getTime());
            } else {
                LOGGER.warn(String.format("No launch time found for instance %s", instance.getInstanceId()));
            }
View Full Code Here

Examples of com.netflix.simianarmy.client.aws.AWSClient.describeInstances()

     * @param instanceId the instance id.
     * @return the list of the AWS instances with the given id.
     */
    protected List<Instance> getAWSInstances(String region, String instanceId) {
        AWSClient awsClient = getAwsClient(region);
        return awsClient.describeInstances(instanceId);
    }
}
View Full Code Here

Examples of com.netflix.simianarmy.client.aws.AWSClient.describeInstances()

        Map<String, List<String>> result = Maps.newHashMap();
        if (instanceIds == null || instanceIds.length == 0) {
            return result;
        }
        AWSClient awsClient = new AWSClient(region, awsCredentialsProvider);
        for (Instance instance : awsClient.describeInstances(instanceIds)) {
            // Ignore instances that are in VPC
            if (StringUtils.isNotEmpty(instance.getVpcId())) {
                LOGGER.info(String.format("Instance %s is in VPC and is ignored.", instance.getInstanceId()));
                continue;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.