use of com.amazonaws.services.ec2.model.EbsInstanceBlockDevice in project aws-athena-query-federation by awslabs.
the class Ec2TableProviderTest method makeInstance.
private Instance makeInstance(String id) {
Instance instance = new Instance();
instance.withInstanceId(id).withImageId("image_id").withInstanceType("instance_type").withPlatform("platform").withPrivateDnsName("private_dns_name").withPrivateIpAddress("private_ip_address").withPublicDnsName("public_dns_name").withPublicIpAddress("public_ip_address").withSubnetId("subnet_id").withVpcId("vpc_id").withArchitecture("architecture").withInstanceLifecycle("instance_lifecycle").withRootDeviceName("root_device_name").withRootDeviceType("root_device_type").withSpotInstanceRequestId("spot_instance_request_id").withVirtualizationType("virtualization_type").withKeyName("key_name").withKernelId("kernel_id").withCapacityReservationId("capacity_reservation_id").withLaunchTime(new Date(100_000)).withState(new InstanceState().withCode(100).withName("name")).withStateReason(new StateReason().withCode("code").withMessage("message")).withEbsOptimized(true);
List<InstanceNetworkInterface> interfaces = new ArrayList<>();
interfaces.add(new InstanceNetworkInterface().withStatus("status").withSubnetId("subnet").withVpcId("vpc").withMacAddress("mac_address").withPrivateDnsName("private_dns").withPrivateIpAddress("private_ip").withNetworkInterfaceId("interface_id").withGroups(new GroupIdentifier().withGroupId("group_id").withGroupName("group_name")));
interfaces.add(new InstanceNetworkInterface().withStatus("status").withSubnetId("subnet").withVpcId("vpc").withMacAddress("mac").withPrivateDnsName("private_dns").withPrivateIpAddress("private_ip").withNetworkInterfaceId("interface_id").withGroups(new GroupIdentifier().withGroupId("group_id").withGroupName("group_name")));
instance.withNetworkInterfaces(interfaces).withSecurityGroups(new GroupIdentifier().withGroupId("group_id").withGroupName("group_name")).withBlockDeviceMappings(new InstanceBlockDeviceMapping().withDeviceName("device_name").withEbs(new EbsInstanceBlockDevice().withVolumeId("volume_id")));
return instance;
}
Aggregations