Package io.micronaut.discovery.cloud.aws
Enum EC2MetadataKeys
- java.lang.Object
-
- java.lang.Enum<EC2MetadataKeys>
-
- io.micronaut.discovery.cloud.aws.EC2MetadataKeys
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<EC2MetadataKeys>
public enum EC2MetadataKeys extends java.lang.Enum<EC2MetadataKeys>
A enum of Amazon EC2 metadata.- Since:
- 1.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description accountIdamiIdavailabilityZoneinstanceIdinstanceTypelocalHostnamelocalIpv4macpublicHostnamepublicIpv4regionvpcId
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAWS_API_VERSIONstatic java.lang.StringAWS_METADATA_URLprotected java.lang.Stringpath
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()java.net.URLgetURL(java.lang.String prepend, java.lang.String append)The URL for metadata information.java.lang.StringtoString()Returns the name of this enum constant, as contained in the declaration.static EC2MetadataKeysvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static EC2MetadataKeys[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
instanceId
public static final EC2MetadataKeys instanceId
-
amiId
public static final EC2MetadataKeys amiId
-
region
public static final EC2MetadataKeys region
-
instanceType
public static final EC2MetadataKeys instanceType
-
localIpv4
public static final EC2MetadataKeys localIpv4
-
localHostname
public static final EC2MetadataKeys localHostname
-
availabilityZone
public static final EC2MetadataKeys availabilityZone
-
publicHostname
public static final EC2MetadataKeys publicHostname
-
publicIpv4
public static final EC2MetadataKeys publicIpv4
-
mac
public static final EC2MetadataKeys mac
-
vpcId
public static final EC2MetadataKeys vpcId
-
accountId
public static final EC2MetadataKeys accountId
-
-
Field Detail
-
AWS_API_VERSION
public static final java.lang.String AWS_API_VERSION
- See Also:
- Constant Field Values
-
AWS_METADATA_URL
public static final java.lang.String AWS_METADATA_URL
- See Also:
- Constant Field Values
-
path
protected java.lang.String path
-
-
Method Detail
-
values
public static EC2MetadataKeys[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EC2MetadataKeys c : EC2MetadataKeys.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EC2MetadataKeys valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getName
public java.lang.String getName()
- Returns:
- The name of key
-
getURL
public java.net.URL getURL(java.lang.String prepend, java.lang.String append) throws java.net.MalformedURLExceptionThe URL for metadata information. Override to apply prepend and append.- Parameters:
prepend- Building the URL endpointsappend- Region- Returns:
- The URL for the Metadata information of specific
Enum.name(). - Throws:
java.net.MalformedURLException- If the URL is invalid
-
toString
public java.lang.String toString()
Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum type should override this method when a more "programmer-friendly" string form exists.- Overrides:
toStringin classjava.lang.Enum<EC2MetadataKeys>- Returns:
- the name of this enum constant
-
-