congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
InstanceBlockDeviceMapping
Code IndexAdd Tabnine to your IDE (free)

How to use
InstanceBlockDeviceMapping
in
com.amazonaws.services.ec2.model

Best Java code snippets using com.amazonaws.services.ec2.model.InstanceBlockDeviceMapping (Showing top 20 results out of 315)

origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode());
  hashCode = prime * hashCode + ((getEbs() == null) ? 0 : getEbs().hashCode());
  return hashCode;
}
origin: aws/aws-sdk-java

/**
 * <p>
 * The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).
 * </p>
 * 
 * @param deviceName
 *        The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public InstanceBlockDeviceMapping withDeviceName(String deviceName) {
  setDeviceName(deviceName);
  return this;
}
origin: aws/aws-sdk-java

/**
 * <p>
 * Parameters used to automatically set up EBS volumes when the instance is launched.
 * </p>
 * 
 * @param ebs
 *        Parameters used to automatically set up EBS volumes when the instance is launched.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public InstanceBlockDeviceMapping withEbs(EbsInstanceBlockDevice ebs) {
  setEbs(ebs);
  return this;
}
origin: aws/aws-sdk-java

public InstanceBlockDeviceMapping unmarshall(StaxUnmarshallerContext context) throws Exception {
  InstanceBlockDeviceMapping instanceBlockDeviceMapping = new InstanceBlockDeviceMapping();
  int originalDepth = context.getCurrentDepth();
  int targetDepth = originalDepth + 1;
  if (context.isStartOfDocument())
    targetDepth += 1;
  while (true) {
    XMLEvent xmlEvent = context.nextEvent();
    if (xmlEvent.isEndDocument())
      return instanceBlockDeviceMapping;
    if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
      if (context.testExpression("deviceName", targetDepth)) {
        instanceBlockDeviceMapping.setDeviceName(StringStaxUnmarshaller.getInstance().unmarshall(context));
        continue;
      }
      if (context.testExpression("ebs", targetDepth)) {
        instanceBlockDeviceMapping.setEbs(EbsInstanceBlockDeviceStaxUnmarshaller.getInstance().unmarshall(context));
        continue;
      }
    } else if (xmlEvent.isEndElement()) {
      if (context.getCurrentDepth() < originalDepth) {
        return instanceBlockDeviceMapping;
      }
    }
  }
}
origin: jenkinsci/ec2-plugin

private List<String> getResourcesToTag(Instance inst) {
  List<String> resources = new ArrayList<>();
  resources.add(inst.getInstanceId());
  for(InstanceBlockDeviceMapping blockDeviceMapping : inst.getBlockDeviceMappings()) {
    resources.add(blockDeviceMapping.getEbs().getVolumeId());
  }
  return resources;
}
origin: org.kuali.common/kuali-aws

protected InstanceBlockDeviceMapping getRootVolumeMapping(Instance instance) {
  checkNotNull(instance, "instance");
  String rootDeviceName = instance.getRootDeviceName();
  List<InstanceBlockDeviceMapping> mappings = instance.getBlockDeviceMappings();
  for (InstanceBlockDeviceMapping mapping : mappings) {
    if (rootDeviceName.equals(mapping.getDeviceName())) {
      return mapping;
    }
  }
  throw illegalState("Unable to locate the root volume mapping for [%s]", instance.getInstanceId());
}
origin: aws-amplify/aws-sdk-android

public InstanceBlockDeviceMapping unmarshall(StaxUnmarshallerContext context) throws Exception {
  InstanceBlockDeviceMapping instanceBlockDeviceMapping = new InstanceBlockDeviceMapping();
  int originalDepth = context.getCurrentDepth();
  int targetDepth = originalDepth + 1;
  if (context.isStartOfDocument()) targetDepth += 1;
  while (true) {
    int xmlEvent = context.nextEvent();
    if (xmlEvent == XmlPullParser.END_DOCUMENT) return instanceBlockDeviceMapping;
    if (xmlEvent == XmlPullParser.START_TAG) {
      if (context.testExpression("deviceName", targetDepth)) {
        instanceBlockDeviceMapping.setDeviceName(StringStaxUnmarshaller.getInstance().unmarshall(context));
        continue;
      }
      if (context.testExpression("ebs", targetDepth)) {
        instanceBlockDeviceMapping.setEbs(EbsInstanceBlockDeviceStaxUnmarshaller.getInstance().unmarshall(context));
        continue;
      }
    } else if (xmlEvent == XmlPullParser.END_TAG) {
      if (context.getCurrentDepth() < originalDepth) {
        return instanceBlockDeviceMapping;
      }
    }
  }
}
origin: stackoverflow.com

 // First get the EC2 instance from the id
DescribeInstancesRequest describeInstancesRequest = new DescribeInstancesRequest().withInstanceIds(instanceId);
DescribeInstancesResult describeInstancesResult = ec2.describeInstances(describeInstancesRequest);
Instance instance = describeInstancesResult.getReservations().get(0).getInstances().get(0);

// Then get the mappings
List<InstanceBlockDeviceMapping> mappingList = instance.getBlockDeviceMappings();
for(InstanceBlockDeviceMapping mapping: mappingList) {
  System.out.println(mapping.getEbs().getVolumeId());
}
origin: org.kuali.common/kuali-aws

protected BlockDeviceMapping getRootVolumeMapping(Instance instance, String snapshotId, RootVolume rootVolume) {
  InstanceBlockDeviceMapping ibdm = getRootVolumeMapping(instance);
  EbsBlockDevice ebs = new EbsBlockDevice();
  ebs.setDeleteOnTermination(rootVolume.getDeleteOnTermination().orNull());
  ebs.setSnapshotId(snapshotId);
  ebs.setVolumeSize(rootVolume.getSizeInGigabytes().orNull());
  BlockDeviceMapping bdm = new BlockDeviceMapping();
  bdm.setDeviceName(ibdm.getDeviceName());
  bdm.setEbs(ebs);
  return bdm;
}
origin: aws/aws-sdk-java

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (obj instanceof InstanceBlockDeviceMapping == false)
    return false;
  InstanceBlockDeviceMapping other = (InstanceBlockDeviceMapping) obj;
  if (other.getDeviceName() == null ^ this.getDeviceName() == null)
    return false;
  if (other.getDeviceName() != null && other.getDeviceName().equals(this.getDeviceName()) == false)
    return false;
  if (other.getEbs() == null ^ this.getEbs() == null)
    return false;
  if (other.getEbs() != null && other.getEbs().equals(this.getEbs()) == false)
    return false;
  return true;
}
origin: com.amazonaws/aws-java-sdk-ec2

public InstanceBlockDeviceMapping unmarshall(StaxUnmarshallerContext context) throws Exception {
  InstanceBlockDeviceMapping instanceBlockDeviceMapping = new InstanceBlockDeviceMapping();
  int originalDepth = context.getCurrentDepth();
  int targetDepth = originalDepth + 1;
  if (context.isStartOfDocument())
    targetDepth += 1;
  while (true) {
    XMLEvent xmlEvent = context.nextEvent();
    if (xmlEvent.isEndDocument())
      return instanceBlockDeviceMapping;
    if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
      if (context.testExpression("deviceName", targetDepth)) {
        instanceBlockDeviceMapping.setDeviceName(StringStaxUnmarshaller.getInstance().unmarshall(context));
        continue;
      }
      if (context.testExpression("ebs", targetDepth)) {
        instanceBlockDeviceMapping.setEbs(EbsInstanceBlockDeviceStaxUnmarshaller.getInstance().unmarshall(context));
        continue;
      }
    } else if (xmlEvent.isEndElement()) {
      if (context.getCurrentDepth() < originalDepth) {
        return instanceBlockDeviceMapping;
      }
    }
  }
}
origin: org.kuali.common/kuali-aws

protected String getRootVolumeId(Instance instance) {
  checkNotNull(instance, "instance");
  InstanceBlockDeviceMapping rootMapping = getRootVolumeMapping(instance);
  return rootMapping.getEbs().getVolumeId();
}
origin: com.amazonaws/aws-java-sdk-ec2

/**
 * <p>
 * Parameters used to automatically set up EBS volumes when the instance is launched.
 * </p>
 * 
 * @param ebs
 *        Parameters used to automatically set up EBS volumes when the instance is launched.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public InstanceBlockDeviceMapping withEbs(EbsInstanceBlockDevice ebs) {
  setEbs(ebs);
  return this;
}
origin: com.amazonaws/aws-java-sdk-ec2

/**
 * <p>
 * The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).
 * </p>
 * 
 * @param deviceName
 *        The device name (for example, <code>/dev/sdh</code> or <code>xvdh</code>).
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public InstanceBlockDeviceMapping withDeviceName(String deviceName) {
  setDeviceName(deviceName);
  return this;
}
origin: aws/aws-sdk-java

/**
 * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
 * redacted from this string using a placeholder value.
 *
 * @return A string representation of this object.
 *
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append("{");
  if (getDeviceName() != null)
    sb.append("DeviceName: ").append(getDeviceName()).append(",");
  if (getEbs() != null)
    sb.append("Ebs: ").append(getEbs());
  sb.append("}");
  return sb.toString();
}
origin: aws-amplify/aws-sdk-android

@Override
public boolean equals(Object obj) {
  if (this == obj) return true;
  if (obj == null) return false;
  if (obj instanceof InstanceBlockDeviceMapping == false) return false;
  InstanceBlockDeviceMapping other = (InstanceBlockDeviceMapping)obj;
  
  if (other.getDeviceName() == null ^ this.getDeviceName() == null) return false;
  if (other.getDeviceName() != null && other.getDeviceName().equals(this.getDeviceName()) == false) return false; 
  if (other.getEbs() == null ^ this.getEbs() == null) return false;
  if (other.getEbs() != null && other.getEbs().equals(this.getEbs()) == false) return false; 
  return true;
}

origin: aws-amplify/aws-sdk-android

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  
  hashCode = prime * hashCode + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode()); 
  hashCode = prime * hashCode + ((getEbs() == null) ? 0 : getEbs().hashCode()); 
  return hashCode;
}

origin: aws-amplify/aws-sdk-android

/**
 * Returns a string representation of this object; useful for testing and
 * debugging.
 *
 * @return A string representation of this object.
 *
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append("{");
  if (getDeviceName() != null) sb.append("DeviceName: " + getDeviceName() + ",");
  if (getEbs() != null) sb.append("Ebs: " + getEbs() );
  sb.append("}");
  return sb.toString();
}

origin: com.amazonaws/aws-java-sdk-ec2

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode());
  hashCode = prime * hashCode + ((getEbs() == null) ? 0 : getEbs().hashCode());
  return hashCode;
}
origin: com.amazonaws/aws-java-sdk-ec2

@Override
public boolean equals(Object obj) {
  if (this == obj)
    return true;
  if (obj == null)
    return false;
  if (obj instanceof InstanceBlockDeviceMapping == false)
    return false;
  InstanceBlockDeviceMapping other = (InstanceBlockDeviceMapping) obj;
  if (other.getDeviceName() == null ^ this.getDeviceName() == null)
    return false;
  if (other.getDeviceName() != null && other.getDeviceName().equals(this.getDeviceName()) == false)
    return false;
  if (other.getEbs() == null ^ this.getEbs() == null)
    return false;
  if (other.getEbs() != null && other.getEbs().equals(this.getEbs()) == false)
    return false;
  return true;
}
com.amazonaws.services.ec2.modelInstanceBlockDeviceMapping

Javadoc

Describes a block device mapping.

Most used methods

  • getEbs
    Parameters used to automatically set up EBS volumes when the instance is launched.
  • getDeviceName
    The device name (for example, /dev/sdh or xvdh).
  • <init>
  • setDeviceName
    The device name (for example, /dev/sdh or xvdh).
  • setEbs
    Parameters used to automatically set up EBS volumes when the instance is launched.

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JTable (javax.swing)
  • JTextField (javax.swing)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now