com.amazonaws.services.ec2.model.Instance.getIamInstanceProfile()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.amazonaws.services.ec2.model.Instance.getIamInstanceProfile()方法的一些代码示例,展示了Instance.getIamInstanceProfile()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Instance.getIamInstanceProfile()方法的具体详情如下:
包路径:com.amazonaws.services.ec2.model.Instance
类名称:Instance
方法名:getIamInstanceProfile

Instance.getIamInstanceProfile介绍

[英]The IAM instance profile associated with the instance, if applicable.
[中]与实例关联的IAM实例配置文件(如果适用)。

代码示例

代码示例来源:origin: aws/aws-sdk-java

if (getHypervisor() != null)
  sb.append("Hypervisor: ").append(getHypervisor()).append(",");
if (getIamInstanceProfile() != null)
  sb.append("IamInstanceProfile: ").append(getIamInstanceProfile()).append(",");
if (getInstanceLifecycle() != null)
  sb.append("InstanceLifecycle: ").append(getInstanceLifecycle()).append(",");

代码示例来源:origin: aws/aws-sdk-java

hashCode = prime * hashCode + ((getEnaSupport() == null) ? 0 : getEnaSupport().hashCode());
hashCode = prime * hashCode + ((getHypervisor() == null) ? 0 : getHypervisor().hashCode());
hashCode = prime * hashCode + ((getIamInstanceProfile() == null) ? 0 : getIamInstanceProfile().hashCode());
hashCode = prime * hashCode + ((getInstanceLifecycle() == null) ? 0 : getInstanceLifecycle().hashCode());
hashCode = prime * hashCode + ((getElasticGpuAssociations() == null) ? 0 : getElasticGpuAssociations().hashCode());

代码示例来源:origin: aws/aws-sdk-java

if (other.getHypervisor() != null && other.getHypervisor().equals(this.getHypervisor()) == false)
  return false;
if (other.getIamInstanceProfile() == null ^ this.getIamInstanceProfile() == null)
  return false;
if (other.getIamInstanceProfile() != null && other.getIamInstanceProfile().equals(this.getIamInstanceProfile()) == false)
  return false;
if (other.getInstanceLifecycle() == null ^ this.getInstanceLifecycle() == null)

代码示例来源:origin: aws-amplify/aws-sdk-android

if (getHypervisor() != null) sb.append("Hypervisor: " + getHypervisor() + ",");
if (getNetworkInterfaces() != null) sb.append("NetworkInterfaces: " + getNetworkInterfaces() + ",");
if (getIamInstanceProfile() != null) sb.append("IamInstanceProfile: " + getIamInstanceProfile() + ",");
if (isEbsOptimized() != null) sb.append("EbsOptimized: " + isEbsOptimized() + ",");
if (getSriovNetSupport() != null) sb.append("SriovNetSupport: " + getSriovNetSupport() );

代码示例来源:origin: aws-amplify/aws-sdk-android

hashCode = prime * hashCode + ((getHypervisor() == null) ? 0 : getHypervisor().hashCode()); 
hashCode = prime * hashCode + ((getNetworkInterfaces() == null) ? 0 : getNetworkInterfaces().hashCode()); 
hashCode = prime * hashCode + ((getIamInstanceProfile() == null) ? 0 : getIamInstanceProfile().hashCode()); 
hashCode = prime * hashCode + ((isEbsOptimized() == null) ? 0 : isEbsOptimized().hashCode()); 
hashCode = prime * hashCode + ((getSriovNetSupport() == null) ? 0 : getSriovNetSupport().hashCode());

代码示例来源:origin: aws-amplify/aws-sdk-android

if (other.getNetworkInterfaces() == null ^ this.getNetworkInterfaces() == null) return false;
if (other.getNetworkInterfaces() != null && other.getNetworkInterfaces().equals(this.getNetworkInterfaces()) == false) return false; 
if (other.getIamInstanceProfile() == null ^ this.getIamInstanceProfile() == null) return false;
if (other.getIamInstanceProfile() != null && other.getIamInstanceProfile().equals(this.getIamInstanceProfile()) == false) return false; 
if (other.isEbsOptimized() == null ^ this.isEbsOptimized() == null) return false;
if (other.isEbsOptimized() != null && other.isEbsOptimized().equals(this.isEbsOptimized()) == false) return false;

代码示例来源:origin: jenkinsci/ec2-plugin

private boolean isSameIamInstanceProfile(Instance instance) {
  return StringUtils.isBlank(getIamInstanceProfile()) ||
      (instance.getIamInstanceProfile() != null &&
          instance.getIamInstanceProfile().getArn().equals(getIamInstanceProfile()));
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

if (getHypervisor() != null)
  sb.append("Hypervisor: ").append(getHypervisor()).append(",");
if (getIamInstanceProfile() != null)
  sb.append("IamInstanceProfile: ").append(getIamInstanceProfile()).append(",");
if (getInstanceLifecycle() != null)
  sb.append("InstanceLifecycle: ").append(getInstanceLifecycle()).append(",");

代码示例来源:origin: jenkinsci/ec2-plugin

private List<Instance> findOrphansOrStopped(DescribeInstancesResult diResult, int number) {
  List<Instance> orphansOrStopped = new ArrayList<>();
  int count = 0;
  for (Reservation reservation : diResult.getReservations()) {
    for (Instance instance : reservation.getInstances()) {
      if (!isSameIamInstanceProfile(instance)) {
        logInstanceCheck(instance, ". false - IAM Instance profile does not match: " + instance.getIamInstanceProfile());
        continue;
      }
      if (isTerminatingOrShuttindDown(instance.getState().getName())) {
        logInstanceCheck(instance, ". false - Instance is terminated or shutting down");
        continue;
      }
      if (checkInstance(instance)) {
        logProvisionInfo("Found existing instance: " + instance);
        orphansOrStopped.add(instance);
        count++;
      }
      if (count == number) {
        return orphansOrStopped;
      }
    }
  }
  return orphansOrStopped;
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

hashCode = prime * hashCode + ((getEnaSupport() == null) ? 0 : getEnaSupport().hashCode());
hashCode = prime * hashCode + ((getHypervisor() == null) ? 0 : getHypervisor().hashCode());
hashCode = prime * hashCode + ((getIamInstanceProfile() == null) ? 0 : getIamInstanceProfile().hashCode());
hashCode = prime * hashCode + ((getInstanceLifecycle() == null) ? 0 : getInstanceLifecycle().hashCode());
hashCode = prime * hashCode + ((getElasticGpuAssociations() == null) ? 0 : getElasticGpuAssociations().hashCode());

代码示例来源:origin: org.jenkins-ci.plugins/ec2

for (Reservation reservation : diResult.getReservations()) {
  for (Instance instance : reservation.getInstances()) {
    if (instance.getIamInstanceProfile() != null && instance.getIamInstanceProfile().getArn().equals(getIamInstanceProfile())) {
      existingInstance = instance;
      break reservationLoop;

代码示例来源:origin: airbnb/billow

this.launchTime = new DateTime(instance.getLaunchTime());
if (instance.getIamInstanceProfile() != null) {
  this.iamInstanceProfile = instance.getIamInstanceProfile().getArn().toString();
} else {
  this.iamInstanceProfile = null;

代码示例来源:origin: com.amazonaws/aws-java-sdk-ec2

if (other.getHypervisor() != null && other.getHypervisor().equals(this.getHypervisor()) == false)
  return false;
if (other.getIamInstanceProfile() == null ^ this.getIamInstanceProfile() == null)
  return false;
if (other.getIamInstanceProfile() != null && other.getIamInstanceProfile().equals(this.getIamInstanceProfile()) == false)
  return false;
if (other.getInstanceLifecycle() == null ^ this.getInstanceLifecycle() == null)

相关文章

Instance类方法