Class OracleCloudMetadataConfiguration

java.lang.Object
io.micronaut.discovery.cloud.oraclecloud.OracleCloudMetadataConfiguration
All Implemented Interfaces:
io.micronaut.core.util.Toggleable

@ConfigurationProperties("micronaut.application.oraclecloud.metadata") @Requires(env="oraclecloud") @Requires(classes=io.micronaut.runtime.ApplicationConfiguration.class) @Primary public class OracleCloudMetadataConfiguration extends Object implements io.micronaut.core.util.Toggleable
Default configuration for retrieving Oracle Cloud metadata for ComputePlatform.ORACLE_CLOUD.
Since:
1.2.0
Author:
Todd Sharp
  • Field Details

  • Constructor Details

    • OracleCloudMetadataConfiguration

      public OracleCloudMetadataConfiguration()
  • Method Details

    • isEnabled

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

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

      public String getUrl()
      Returns:
      The Url
    • getBaseUrl

      public String getBaseUrl()
      Returns:
      The base URL of the metadata service.
    • setUrl

      public void setUrl(String url)
      Default value: "http://169.254.169.254/opc/v1/instance/" or "http://169.254.169.254/opc/v2/instance/", depending on the value of v2Enabled.
      Parameters:
      url - The url
    • getMetadataUrl

      @Deprecated(since="3.6.0", forRemoval=true) public String getMetadataUrl()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getUrl() instead.
      Returns:
      The metadata Url
    • setMetadataUrl

      @Deprecated(since="3.6.0", forRemoval=true) public void setMetadataUrl(String metadataUrl)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use setUrl(String) instead.
      Deprecated. Use url instead.
      Parameters:
      metadataUrl - The metadata Url
    • getInstanceDocumentUrl

      @Deprecated(since="3.6.0", forRemoval=true) public String getInstanceDocumentUrl()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use getUrl() instead.
      Returns:
      The instance document Url
    • setInstanceDocumentUrl

      @Deprecated(since="3.6.0", forRemoval=true) public void setInstanceDocumentUrl(String instanceDocumentUrl)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use setUrl(String) instead.
      Deprecated. Use url instead.
      Parameters:
      instanceDocumentUrl - The instance document Url
    • getVnicUrl

      public String getVnicUrl()
      Default value: "http://169.254.169.254/opc/v1/vnics/" or "http://169.254.169.254/opc/v2/vnics/", depending on the value of v2Enabled.
      Returns:
      The VNIC Url
    • setVnicUrl

      public void setVnicUrl(String vnicUrl)
      Parameters:
      vnicUrl - The instance document Url
    • isV1Enabled

      public boolean isV1Enabled()
      Returns:
      Whether the V1 metadata is enabled
    • setV1Enabled

      public void setV1Enabled(boolean v1Enabled)
      Default value: false.
      Parameters:
      v1Enabled - Enable or disable the V1 metadata
    • isV2Enabled

      public boolean isV2Enabled()
      Returns:
      Whether the V2 metadata is enabled
    • setV2Enabled

      public void setV2Enabled(boolean v2Enabled)
      Default value: true.
      Parameters:
      v2Enabled - Enable or disable the V2 metadata