public class EC2ServiceInstance extends Object implements ServiceInstance, ServiceInstance.Builder
ServiceInstance.Builder
GROUP, REGION, ZONE
Constructor and Description |
---|
EC2ServiceInstance(String id,
URI uri)
Container to hold AWS EC2 Instance info.
|
Modifier and Type | Method and Description |
---|---|
ServiceInstance |
build()
build for the builder.
|
Optional<String> |
getGroup()
Gets group of instance.
|
HealthStatus |
getHealthStatus()
Gets the current instance health status.
|
String |
getId()
Same as instance id.
|
Optional<String> |
getInstanceId()
Gets AWS ID for the instance.
|
ConvertibleValues<String> |
getMetadata()
Gets the metadata information gathered from AWS for this instance.
|
Optional<String> |
getRegion()
Gets the AWS Region of the instance.
|
URI |
getURI()
URI This instance can be access via (internal).
|
Optional<String> |
getZone()
Gets the Zone/AZ for the AWS Instance.
|
ServiceInstance.Builder |
group(String group)
builder for group (not used).
|
ServiceInstance.Builder |
instanceId(String id)
instance id (same as id).
|
ServiceInstance.Builder |
metadata(ConvertibleValues<String> metadata)
Builder for metadata.
|
ServiceInstance.Builder |
metadata(Map<String,String> metadata)
Builder for metadata in map format.
|
ServiceInstance.Builder |
region(String region)
Builder for region.
|
ServiceInstance.Builder |
status(HealthStatus status)
Build for health status.
|
ServiceInstance.Builder |
zone(String zone)
The availablity zone of instance.
|
public ConvertibleValues<String> getMetadata()
getMetadata
in interface ServiceInstance
public HealthStatus getHealthStatus()
getHealthStatus
in interface ServiceInstance
public Optional<String> getInstanceId()
getInstanceId
in interface ServiceInstance
public Optional<String> getZone()
getZone
in interface ServiceInstance
public Optional<String> getRegion()
getRegion
in interface ServiceInstance
public Optional<String> getGroup()
getGroup
in interface ServiceInstance
public String getId()
getId
in interface ServiceInstance
public URI getURI()
getURI
in interface ServiceInstance
public ServiceInstance.Builder instanceId(String id)
instanceId
in interface ServiceInstance.Builder
id
- The instance idpublic ServiceInstance.Builder zone(String zone)
zone
in interface ServiceInstance.Builder
zone
- The zonepublic ServiceInstance.Builder region(String region)
region
in interface ServiceInstance.Builder
region
- The regionpublic ServiceInstance.Builder group(String group)
group
in interface ServiceInstance.Builder
group
- The grouppublic ServiceInstance.Builder status(HealthStatus status)
status
in interface ServiceInstance.Builder
status
- The statuspublic ServiceInstance.Builder metadata(ConvertibleValues<String> metadata)
metadata
- from awspublic ServiceInstance.Builder metadata(Map<String,String> metadata)
metadata
in interface ServiceInstance.Builder
metadata
- The metadata in map formatpublic ServiceInstance build()
build
in interface ServiceInstance.Builder