Class: AWS.MetadataService
- Inherits:
-
Object
- Object
- AWS.MetadataService
- Defined in:
- lib/metadata_service.js
Overview
This feature is not supported in the browser environment of the SDK.
Represents a metadata service available on EC2 instances. Using the request() method, you can receieve metadata about any available resource on the metadata service.
You can disable the use of the IMDS by setting the AWS_EC2_METADATA_DISABLED environment variable to a truthy value.
Constructor Summary collapse
-
new AWS.MetadataService(options) ⇒ void
constructor
Creates a new MetadataService object with a given set of options.
Property Summary collapse
-
disableFetchToken ⇒ Boolean
static
readwrite
when enabled, metadata service will not fetch token.
-
httpOptions ⇒ map
readwrite
A map of options to pass to the underlying HTTP request:.
Method Summary collapse
-
request(path, options, callback) ⇒ void
Sends a request to the instance metadata service for a given resource.
Constructor Details
new AWS.MetadataService(options) ⇒ void
Creates a new MetadataService object with a given set of options.
Property Details
disableFetchToken ⇒ Boolean (static, readwrite)
when enabled, metadata service will not fetch token
httpOptions ⇒ map (readwrite)
Returns a map of options to pass to the underlying HTTP request:
- timeout (Number) — a timeout value in milliseconds to wait before aborting the connection. Set to 0 for no timeout.
Method Details
request(path, options, callback) ⇒ void
Sends a request to the instance metadata service for a given resource.