Class AwsVirtualMachineBiz
java.lang.Object
net.solarnetwork.service.support.BasicIdentifiable
net.solarnetwork.central.cloud.aws.biz.AwsVirtualMachineBiz
- All Implemented Interfaces:
VirtualMachineBiz,net.solarnetwork.service.Identifiable
public class AwsVirtualMachineBiz
extends net.solarnetwork.service.support.BasicIdentifiable
implements VirtualMachineBiz
AWS SDK implementation of
VirtualMachineBiz.-
Field Summary
Fields inherited from interface net.solarnetwork.service.Identifiable
GROUP_UID_PROPERTY, UID_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionAwsVirtualMachineBiz(String region, String accessKey, String accessKeySecret) Constructor.AwsVirtualMachineBiz(software.amazon.awssdk.regions.Region region, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeVirtualMachinesState(Set<String> machineIds, VirtualMachineState desiredState) Change the state of a set of virtual machines.stateForVirtualMachines(Set<String> machineIds) Get the state for a set of virtual machines.virtualMachineForName(String name) Get a virtual machine by its display name.virtualMachinesForIds(Set<String> ids) Get a set of virtual machines by their IDs.Methods inherited from class net.solarnetwork.service.support.BasicIdentifiable
basicIdentifiableMetadataSettings, basicIdentifiableSettings, basicIdentifiableSettings, basicIdentifiableSettings, doubleMetadataValue, getDisplayName, getGroupUid, getGroupUID, getMessageSource, getMetadata, getMetadataCount, getUid, getUID, integerMetadataValue, metadataValue, numberMetadataValue, saveMetadataValue, saveMetadataValue, setDisplayName, setGroupUid, setGroupUID, setMessageSource, setMetadata, setMetadataCount, setUid, setUID, smartMetadataValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.service.Identifiable
getDisplayName, getGroupUid, getUid
-
Constructor Details
-
AwsVirtualMachineBiz
Constructor.- Parameters:
region- the AWS region nameaccessKey- the access keyaccessKeySecret- the access key secret
-
AwsVirtualMachineBiz
public AwsVirtualMachineBiz(software.amazon.awssdk.regions.Region region, software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) Constructor.- Parameters:
region- the AWS regioncredentialsProvider- the credentials provider
-
-
Method Details
-
virtualMachineForName
Description copied from interface:VirtualMachineBizGet a virtual machine by its display name.- Specified by:
virtualMachineForNamein interfaceVirtualMachineBiz- Parameters:
name- the name of the machine to get- Returns:
- the machine, or null if not available
-
virtualMachinesForIds
Description copied from interface:VirtualMachineBizGet a set of virtual machines by their IDs.- Specified by:
virtualMachinesForIdsin interfaceVirtualMachineBiz- Parameters:
ids- the IDs of the machines to get- Returns:
- the found machines
-
stateForVirtualMachines
Description copied from interface:VirtualMachineBizGet the state for a set of virtual machines.- Specified by:
stateForVirtualMachinesin interfaceVirtualMachineBiz- Parameters:
machineIds- the IDs of the machines to get the state for- Returns:
- a mapping of machine IDs to associated states; never null
-
changeVirtualMachinesState
Description copied from interface:VirtualMachineBizChange the state of a set of virtual machines.- Specified by:
changeVirtualMachinesStatein interfaceVirtualMachineBiz- Parameters:
machineIds- the IDs of the machines to change the state ofdesiredState- the desired state
-