Class AmazonMetadataConfiguration

java.lang.Object
io.micronaut.discovery.cloud.aws.AmazonMetadataConfiguration
All Implemented Interfaces:
io.micronaut.core.util.Toggleable

@ConfigurationProperties("micronaut.application.ec2.metadata") @Requires(notEnv="function") @Requires(env="ec2") @Primary public class AmazonMetadataConfiguration extends Object implements io.micronaut.core.util.Toggleable
Default configuration for retrieving Amazon EC2 metadata for ComputePlatform.AMAZON_EC2.
Since:
1.0
Author:
graemerocher
  • Field Details

  • Constructor Details

    • AmazonMetadataConfiguration

      public AmazonMetadataConfiguration()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
      Returns:
      Whether the Amazon EC2 configuration is enabled
    • setEnabled

      public void setEnabled(boolean enabled)
      Default value (true).
      Parameters:
      enabled - Enable or disable the Amazon EC2 configuration
    • getUrl

      public String getUrl()
      Returns:
      The Url
    • setUrl

      public void setUrl(String url)
      Default value ("http://169.254.169.254").
      Parameters:
      url - The url
    • getMetadataUrl

      public String getMetadataUrl()
      Returns:
      The metadata Url
    • setMetadataUrl

      public void setMetadataUrl(String metadataUrl)
      Parameters:
      metadataUrl - The metadata Url
    • getInstanceDocumentUrl

      public String getInstanceDocumentUrl()
      Returns:
      The instance document Url
    • setInstanceDocumentUrl

      public void setInstanceDocumentUrl(String instanceDocumentUrl)
      Parameters:
      instanceDocumentUrl - The instance document Url