@Singleton @Requires(env="ec2") public class AmazonComputeInstanceMetadataResolver extends java.lang.Object implements ComputeInstanceMetadataResolver
ComputeInstanceMetadata
for Amazon EC2.Constructor and Description |
---|
AmazonComputeInstanceMetadataResolver()
Create a new instance to resolve
ComputeInstanceMetadata for Amazon EC2 with default configurations. |
AmazonComputeInstanceMetadataResolver(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
AmazonMetadataConfiguration configuration)
Create a new instance to resolve
ComputeInstanceMetadata for Amazon EC2. |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<ComputeInstanceMetadata> |
resolve(Environment environment)
Resolves
ComputeInstanceMetadata for the current environment if possible. |
@Inject public AmazonComputeInstanceMetadataResolver(com.fasterxml.jackson.databind.ObjectMapper objectMapper, AmazonMetadataConfiguration configuration)
ComputeInstanceMetadata
for Amazon EC2.objectMapper
- To convert AWS EC2 metadata information into Mapconfiguration
- AWS Metadata configurationpublic AmazonComputeInstanceMetadataResolver()
ComputeInstanceMetadata
for Amazon EC2 with default configurations.public java.util.Optional<ComputeInstanceMetadata> resolve(Environment environment)
ComputeInstanceMetadataResolver
ComputeInstanceMetadata
for the current environment if possible.resolve
in interface ComputeInstanceMetadataResolver
environment
- The environmentComputeInstanceMetadata