use of com.aliyuncs.ecs.model.v20140526.DescribeZonesRequest in project jointware by isdream.
the class AliyunECSAPIExample method main.
/**
* @param args
* @throws ClientException
* @throws ServerException
*/
public static void main(String[] args) throws ServerException, ClientException {
IClientProfile profile = DefaultProfile.getProfile(REGINE_ID, ACCESS_KEY_ID, ACCESS_KEY_SECRET);
IAcsClient client = new DefaultAcsClient(profile);
DescribeZonesRequest request = new DescribeZonesRequest();
DescribeZonesResponse response = client.getAcsResponse(request);
System.out.println(response.getZones().get(0).getZoneId());
DescribeInstancesRequest dur = new DescribeInstancesRequest();
for (Instance ins : client.getAcsResponse(dur).getInstances()) {
System.out.println(ins.getInstanceName() + "\t:" + ins.getRegionId());
}
}
use of com.aliyuncs.ecs.model.v20140526.DescribeZonesRequest in project jointware by isdream.
the class ECSMain method main.
/**
* @param args
* @throws ClientException
* @throws ServerException
*/
public static void main(String[] args) throws ServerException, ClientException {
IClientProfile profile = DefaultProfile.getProfile(REGINE_ID, ACCESS_KEY_ID, ACCESS_KEY_SECRET);
IAcsClient client = new DefaultAcsClient(profile);
DescribeZonesRequest request = new DescribeZonesRequest();
DescribeZonesResponse response = client.getAcsResponse(request);
System.out.println(response.getZones().get(0).getZoneId());
DescribeInstancesRequest dur = new DescribeInstancesRequest();
for (Instance ins : client.getAcsResponse(dur).getInstances()) {
System.out.println(ins.getInstanceName() + "\t:" + ins.getRegionId());
}
// dur.setZoneId(zoneId);;
}
Aggregations