List of usage examples for com.amazonaws.services.autoscaling.model AutoScalingGroup getPlacementGroup
public String getPlacementGroup()
The name of the placement group into which to launch your instances, if any.
From source file:com.haskins.cloudtrailviewer.dialog.resourcedetail.detailpanels.AsGroupDetail.java
License:Open Source License
private void buildUI(DescribeAutoScalingGroupsResult detail) { JTabbedPane tabs = new JTabbedPane(); tabs.add("AS Group", primaryScrollPane); tabs.add("Tags", tagsScrollPane); this.add(tabs, BorderLayout.CENTER); List<AutoScalingGroup> groups = detail.getAutoScalingGroups(); if (!groups.isEmpty()) { AutoScalingGroup group = groups.get(0); if (group.getAutoScalingGroupARN() != null) { primaryTableModel.addRow(new Object[] { "AutoScaling Group Arn", group.getAutoScalingGroupARN() }); }// ww w . j a v a 2 s. c om if (group.getAutoScalingGroupName() != null) { primaryTableModel .addRow(new Object[] { "AutoScaling Group Name", group.getAutoScalingGroupName() }); } if (!group.getAvailabilityZones().isEmpty()) { StringBuilder azs = new StringBuilder(); for (String az : group.getAvailabilityZones()) { azs.append(az).append(", "); } primaryTableModel.addRow(new Object[] { "Availability Zones", azs.toString() }); } if (group.getCreatedTime() != null) { primaryTableModel.addRow(new Object[] { "Created", getDateString(group.getCreatedTime()) }); } if (group.getDefaultCooldown() != null) { primaryTableModel.addRow(new Object[] { "Default Cooldown", group.getDefaultCooldown() }); } if (group.getDesiredCapacity() != null) { primaryTableModel.addRow(new Object[] { "Desired Capacity", group.getDesiredCapacity() }); } if (group.getHealthCheckGracePeriod() != null) { primaryTableModel .addRow(new Object[] { "HealthCheck Grace Period", group.getHealthCheckGracePeriod() }); } if (group.getHealthCheckType() != null) { primaryTableModel.addRow(new Object[] { "HealthCheck Type", group.getHealthCheckType() }); } if (!group.getInstances().isEmpty()) { StringBuilder instances = new StringBuilder(); for (Instance instance : group.getInstances()) { instances.append(instance.getInstanceId()).append(", "); } primaryTableModel.addRow(new Object[] { "Instances", instances.toString() }); } if (group.getLaunchConfigurationName() != null) { primaryTableModel .addRow(new Object[] { "Launch Configuration Name", group.getLaunchConfigurationName() }); } if (!group.getLoadBalancerNames().isEmpty()) { StringBuilder instances = new StringBuilder(); for (String instance : group.getLoadBalancerNames()) { instances.append(instance).append(", "); } primaryTableModel.addRow(new Object[] { "LoadBalancer names", instances.toString() }); } if (group.getMaxSize() != null) { primaryTableModel.addRow(new Object[] { "Max Size", group.getMaxSize() }); } if (group.getMinSize() != null) { primaryTableModel.addRow(new Object[] { "Min Size", group.getMinSize() }); } if (group.getPlacementGroup() != null) { primaryTableModel.addRow(new Object[] { "Placement Group", group.getPlacementGroup() }); } if (group.getVPCZoneIdentifier() != null) { primaryTableModel.addRow(new Object[] { "VPC Zone Identifier", group.getVPCZoneIdentifier() }); } List<TagDescription> tags = group.getTags(); for (TagDescription tag : tags) { tagsTableModel.addRow(new Object[] { tag.getKey(), tag.getValue() }); } } }
From source file:org.xmlsh.aws.asDescribeGroups.java
License:BSD License
private void write(AutoScalingGroup group) throws XMLStreamException { startElement("group"); attribute("group-arn", group.getAutoScalingGroupARN()); attribute("name", group.getAutoScalingGroupName()); attribute("create-time", group.getCreatedTime()); attribute("default-cooldown", group.getDefaultCooldown()); attribute("desired-capacity", group.getDesiredCapacity()); attribute("health-check-grace-period", group.getHealthCheckGracePeriod()); attribute("health-check-type", group.getHealthCheckType()); attribute("launch-configuration-name", group.getLaunchConfigurationName()); attribute("max-size", group.getMaxSize()); attribute("min-size", group.getMinSize()); attribute("placement-group", group.getPlacementGroup()); attribute("status", group.getStatus()); attribute("vpc-zone-id", group.getVPCZoneIdentifier()); writeStringList("termination-policies", "termination-policy", "name", group.getTerminationPolicies()); writeZones(group.getAvailabilityZones()); writeMetrics(group.getEnabledMetrics()); writeInstances(group.getInstances()); writeELBNames(group.getLoadBalancerNames()); writeSuspendedProcesses(group.getSuspendedProcesses()); writeTagDescriptions(group.getTags()); endElement();/*from w w w .java2s .com*/ }