本文整理了Java中com.amazonaws.services.ec2.model.Instance.getInstanceId()
方法的一些代码示例,展示了Instance.getInstanceId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instance.getInstanceId()
方法的具体详情如下:
包路径:com.amazonaws.services.ec2.model.Instance
类名称:Instance
方法名:getInstanceId
[英]The ID of the instance.
[中]实例的ID。
代码示例来源:origin: apache/incubator-druid
@Override
public String apply(Instance input)
{
return input.getInstanceId();
}
}
代码示例来源:origin: apache/incubator-druid
@Override
public String apply(Instance input)
{
return input.getInstanceId();
}
}
代码示例来源:origin: apache/incubator-druid
@Override
public String apply(Instance input)
{
return input.getInstanceId();
}
}
代码示例来源:origin: apache/usergrid
LOG.info( "{} is {}", in.getInstanceId(), in.getState().getName() );
stateStr.equals( InstanceState.Terminated.toString() ) ) {
instanceIdCopy.remove( in.getInstanceId() );
stateStr.equals( InstanceState.Running.toString() ) ) {
instanceIdCopy.remove( in.getInstanceId() );
stateStr.equals( InstanceState.Stopped.toString() ) ) {
instanceIdCopy.remove( in.getInstanceId() );
instanceIdCopy.remove( in.getInstanceId() );
代码示例来源:origin: aws/aws-sdk-java
if (getImageId() != null)
sb.append("ImageId: ").append(getImageId()).append(",");
if (getInstanceId() != null)
sb.append("InstanceId: ").append(getInstanceId()).append(",");
if (getInstanceType() != null)
sb.append("InstanceType: ").append(getInstanceType()).append(",");
代码示例来源:origin: stackoverflow.com
for (Instance instance : instances) {
CreateTagsRequest createTagsRequest = new CreateTagsRequest();
createTagsRequest.withResources(instance.getInstanceId()) //
.withTags(new Tag("Name", "travel-ecommerce-" + idx));
ec2.createTags(createTagsRequest);
代码示例来源:origin: h2oai/h2o-2
ArrayList<String> ids = new ArrayList<String>();
for( Instance instance : runRes.getReservation().getInstances() )
ids.add(instance.getInstanceId());
代码示例来源:origin: aws/aws-sdk-java
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode());
hashCode = prime * hashCode + ((getKernelId() == null) ? 0 : getKernelId().hashCode());
代码示例来源:origin: awsdocs/aws-doc-sdk-examples
String reservation_id = run_response.getReservation().getInstances().get(0).getInstanceId();
代码示例来源:origin: apache/usergrid
instanceIds.add( i, instance.getInstanceId() );
LOG.debug( "Setting name of runner instance with id: {}", instanceIds.get( i ) );
代码示例来源:origin: apache/usergrid
instanceIds.add( i, instance.getInstanceId() );
LOG.debug( "Setting name of cluster instance with id: {}", instanceIds.get( i ) );
代码示例来源:origin: awsdocs/aws-doc-sdk-examples
"state %s " +
"and monitoring state %s",
instance.getInstanceId(),
instance.getImageId(),
instance.getInstanceType(),
代码示例来源:origin: apache/usergrid
/**
* Constructs and returns an BasicInstance object, using information from <code>ec2</code>
*
* @param ec2
* @return
*/
protected static Instance toInstance( com.amazonaws.services.ec2.model.Instance ec2 ) {
Instance instance;
BasicInstanceSpec spec;
spec = new BasicInstanceSpec();
spec.setImageId( ec2.getImageId() );
spec.setKeyName( ec2.getKeyName() );
spec.setType( ec2.getInstanceType() );
instance = new BasicInstance(
ec2.getInstanceId(),
spec,
InstanceState.fromValue( ec2.getState().getName() ),
ec2.getPrivateDnsName(),
ec2.getPublicDnsName(),
ec2.getPrivateIpAddress(),
ec2.getPublicIpAddress()
);
return instance;
}
代码示例来源:origin: aws/aws-sdk-java
if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false)
return false;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
return false;
if (other.getInstanceType() == null ^ this.getInstanceType() == null)
代码示例来源:origin: stackoverflow.com
DescribeInstancesRequest request = new DescribeInstancesRequest();
List<String> valuesT1 = new ArrayList<String>();
valuesT1.add("my-keypair-name");
Filter filter = new Filter("key-name", valuesT1);
DescribeInstancesResult result = ec2.describeInstances(request.withFilters(filter));
List<Reservation> reservations = result.getReservations();
for (Reservation reservation : reservations) {
List<Instance> instances = reservation.getInstances();
for (Instance instance : instances) {
System.out.println(instance.getInstanceId());
}
}
代码示例来源:origin: aws-amplify/aws-sdk-android
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getInstanceId() != null) sb.append("InstanceId: " + getInstanceId() + ",");
if (getImageId() != null) sb.append("ImageId: " + getImageId() + ",");
if (getState() != null) sb.append("State: " + getState() + ",");
代码示例来源:origin: aws-amplify/aws-sdk-android
int hashCode = 1;
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getImageId() == null) ? 0 : getImageId().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
代码示例来源:origin: io.druid/druid-indexing-service
@Override
public String apply(Instance input)
{
return input.getInstanceId();
}
}
代码示例来源:origin: aws-amplify/aws-sdk-android
Instance other = (Instance)obj;
if (other.getInstanceId() == null ^ this.getInstanceId() == null) return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false) return false;
if (other.getImageId() == null ^ this.getImageId() == null) return false;
if (other.getImageId() != null && other.getImageId().equals(this.getImageId()) == false) return false;
代码示例来源:origin: com.hazelcast.simulator/simulator
private void terminateInstances(List<Instance> instances) {
List<String> ids = new ArrayList<String>();
for (Instance instance : instances) {
ids.add(instance.getInstanceId());
}
TerminateInstancesRequest terminateInstancesRequest = new TerminateInstancesRequest();
terminateInstancesRequest.withInstanceIds(ids);
ec2.terminateInstances(terminateInstancesRequest);
}
内容来源于网络,如有侵权,请联系作者删除!