List of usage examples for com.amazonaws.services.ec2.model InstanceAttributeName SriovNetSupport
InstanceAttributeName SriovNetSupport
To view the source code for com.amazonaws.services.ec2.model InstanceAttributeName SriovNetSupport.
Click Source Link
From source file:com.cloudera.director.aws.ec2.EC2Provider.java
License:Apache License
private void fillMissingProperties(Instance instance) { try {//from w ww . j av a2s . com DescribeInstanceAttributeRequest request = new DescribeInstanceAttributeRequest() .withInstanceId(instance.getInstanceId()).withAttribute(InstanceAttributeName.SriovNetSupport); DescribeInstanceAttributeResult result = client.describeInstanceAttribute(request); String sriovNetSupport = result.getInstanceAttribute().getSriovNetSupport(); instance.setSriovNetSupport(sriovNetSupport); } catch (AmazonServiceException e) { // In practice, users may not have appropriate IAM permission for // DescribeInstanceAttribute. We need to be more forgiving in those cases, // and simply leave a warning in the log here. LOG.warn("Could not fill missing properties. Failed to perform " + "DescribeInstanceAttribute action.", e); } }