| Modifier and Type | Field and Description |
|---|---|
static String |
ERROR_CODE_SUBNET_ID_NOT_FOUND
http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html
|
| Constructor and Description |
|---|
Ec2DaoImpl() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
addSecurityGroupsToEc2Instance(String ec2InstanceId,
List<String> securityGroups,
AwsParamsDto awsParams)
Adds the security groups to an EC2 instance.
|
List<com.amazonaws.services.ec2.model.AvailabilityZone> |
getAvailabilityZonesForSubnetIds(Collection<com.amazonaws.services.ec2.model.Subnet> subnets,
AwsParamsDto awsParamsDto)
This implementation uses the DescribeAvailabilityZones API to get the list of AZs.
|
com.amazonaws.services.ec2.AmazonEC2Client |
getEc2Client(AwsParamsDto awsParamsDto)
Create the EC2 client with the given proxy and access key details This is the main AmazonEC2Client object
|
List<com.amazonaws.services.ec2.model.SpotPrice> |
getLatestSpotPrices(String availabilityZone,
Collection<String> instanceTypes,
Collection<String> productDescriptions,
AwsParamsDto awsParamsDto)
This implementation uses DescribeSpotPriceHistory API which returns the latest spot price history for the specified AZ and instance types.
|
List<com.amazonaws.services.ec2.model.Subnet> |
getSubnets(Collection<String> subnetIds,
AwsParamsDto awsParamsDto)
This implementation uses the DescribeSubnets API.
|
void |
setEc2Operations(Ec2Operations ec2Operations)
Sets implementation of the EC2 operations.
|
public static final String ERROR_CODE_SUBNET_ID_NOT_FOUND
public List<String> addSecurityGroupsToEc2Instance(String ec2InstanceId, List<String> securityGroups, AwsParamsDto awsParams)
addSecurityGroupsToEc2Instance in interface Ec2Daoec2InstanceId - the ec2 instance id.securityGroups - security groups to be added.awsParams - awsParamsDto objectpublic com.amazonaws.services.ec2.AmazonEC2Client getEc2Client(AwsParamsDto awsParamsDto)
getEc2Client in interface Ec2DaoawsParamsDto - AWS related parameters for access/secret keys and proxy detailspublic List<com.amazonaws.services.ec2.model.SpotPrice> getLatestSpotPrices(String availabilityZone, Collection<String> instanceTypes, Collection<String> productDescriptions, AwsParamsDto awsParamsDto)
getLatestSpotPrices in interface Ec2DaoavailabilityZone - The AZ which the spot prices belong in.instanceTypes - The instance types of the spot prices.productDescriptions - The product descriptions to filter by. Empty collection will be ignored.awsParamsDto - AWS connection parameters.public List<com.amazonaws.services.ec2.model.AvailabilityZone> getAvailabilityZonesForSubnetIds(Collection<com.amazonaws.services.ec2.model.Subnet> subnets, AwsParamsDto awsParamsDto)
getAvailabilityZonesForSubnetIds in interface Ec2Daosubnets - The subnets which belong to the returned AZsawsParamsDto - AWS connection parameters.public List<com.amazonaws.services.ec2.model.Subnet> getSubnets(Collection<String> subnetIds, AwsParamsDto awsParamsDto)
getSubnets in interface Ec2DaosubnetIds - List of subnet IDs.awsParamsDto - AWS connection parameters.public void setEc2Operations(Ec2Operations ec2Operations)
ec2Operations - the implementation of the EC2 operationsCopyright © 2019. All rights reserved.