@ConfigurationProperties(value="micronaut.application.gcp.metadata") @Requires(env="gcp") public class GoogleComputeMetadataConfiguration extends java.lang.Object implements Toggleable
ComputePlatform.GOOGLE_COMPUTE
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CONNECTTIMEOUT
The default connect timeout in seconds.
|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static java.lang.String |
DEFAULT_METADATAURL
The default metadata url value.
|
static java.lang.String |
DEFAULT_PROJECTMETADATAURL
The default project metadata url value.
|
static int |
DEFAULT_READTIMEOUT
The default read timeout in seconds.
|
static java.lang.String |
PREFIX
Prefix for Google Compute configuration.
|
Constructor and Description |
---|
GoogleComputeMetadataConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.time.Duration |
getConnectTimeout() |
java.lang.String |
getMetadataUrl() |
java.lang.String |
getProjectMetadataUrl() |
java.time.Duration |
getReadTimeout() |
boolean |
isEnabled() |
void |
setConnectTimeout(java.time.Duration connectTimeout)
Default value (2).
|
void |
setEnabled(boolean enabled)
Default value (true).
|
void |
setMetadataUrl(java.lang.String metadataUrl)
Default value ("http://metadata.google.internal/computeMetadata/v1/project/").
|
void |
setProjectMetadataUrl(java.lang.String projectMetadataUrl)
Default value ("http://metadata.google.internal/project/v1/project/").
|
void |
setReadTimeout(java.time.Duration readTimeout)
Default value (5 seconds).
|
public static final java.lang.String PREFIX
public static final boolean DEFAULT_ENABLED
public static final java.lang.String DEFAULT_METADATAURL
public static final java.lang.String DEFAULT_PROJECTMETADATAURL
public static final int DEFAULT_READTIMEOUT
public static final int DEFAULT_CONNECTTIMEOUT
public boolean isEnabled()
isEnabled
in interface Toggleable
public void setEnabled(boolean enabled)
enabled
- Enable or disable the Google Compute configurationpublic java.lang.String getMetadataUrl()
public void setMetadataUrl(java.lang.String metadataUrl)
metadataUrl
- The metadata Urlpublic java.lang.String getProjectMetadataUrl()
public void setProjectMetadataUrl(java.lang.String projectMetadataUrl)
projectMetadataUrl
- The project metadata Urlpublic java.time.Duration getReadTimeout()
public void setReadTimeout(java.time.Duration readTimeout)
readTimeout
- The read timeoutpublic java.time.Duration getConnectTimeout()
public void setConnectTimeout(java.time.Duration connectTimeout)
connectTimeout
- The connect timeout